#
48f31ee7 |
|
03-Jan-2024 |
Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
cmd/command.c: constify "arg" argument of cmd_get_data_size() This function obviously does not and must not modify "arg". Change the prototype to allow passing an argument of type "const char*" without requiring a cast. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
#
8632b36b |
|
18-Nov-2023 |
Simon Glass <sjg@chromium.org> |
command: Introduce functions to obtain command arguments Add some functions which provide an argument to a command, or NULL if the argument does not exist. Use the same numbering as argv[] since it seems less confusing than the previous idea. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> |
#
10c398d6 |
|
18-Nov-2023 |
Simon Glass <sjg@chromium.org> |
treewide: Tidy up semicolon after command macros The U_BOOT_CMD_COMPLETE() macro has a semicolon at the end, perhaps inadvertently. Some code has taken advantage of this. Tidy this up by dropping the semicolon from the macro and adding it to macro invocations as required. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> |
#
dec5777f |
|
07-Oct-2023 |
Tom Rini <trini@konsulko.com> |
command.h: Add a U_BOOT_LONGHELP macro In order to be able to discard unused long help texts without further linker lists, add a macro for defining the long help messages which uses __maybe_unused. This allows us to discard them as unreferenced as part of the link. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
6321391a |
|
01-Oct-2023 |
Simon Glass <sjg@chromium.org> |
cli: Drop #ifdefs for CONFIG_AUTO_COMPLETE in cli_readline Use a static inline and adjust the logic to avoid the need for #ifdefs in cli_readline_into_buffer() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
be595146 |
|
27-Sep-2023 |
Simon Glass <sjg@chromium.org> |
command: Include a required header in command.h This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> |
#
99970b55 |
|
06-Sep-2023 |
Marek Vasut <marek.vasut+renesas@mailbox.org> |
command: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> |
#
26f923c7 |
|
20-Mar-2023 |
Evgeny Bachinin <EABachinin@sberdevices.ru> |
cli: run_commandf(): small fixups * vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable āiā set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
d99e6f78 |
|
22-Feb-2023 |
Simon Glass <sjg@chromium.org> |
command: Don't allow commands in SPL At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
8632b36b |
|
18-Nov-2023 |
Simon Glass <sjg@chromium.org> |
command: Introduce functions to obtain command arguments Add some functions which provide an argument to a command, or NULL if the argument does not exist. Use the same numbering as argv[] since it seems less confusing than the previous idea. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> |
#
10c398d6 |
|
18-Nov-2023 |
Simon Glass <sjg@chromium.org> |
treewide: Tidy up semicolon after command macros The U_BOOT_CMD_COMPLETE() macro has a semicolon at the end, perhaps inadvertently. Some code has taken advantage of this. Tidy this up by dropping the semicolon from the macro and adding it to macro invocations as required. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> |
#
dec5777f |
|
07-Oct-2023 |
Tom Rini <trini@konsulko.com> |
command.h: Add a U_BOOT_LONGHELP macro In order to be able to discard unused long help texts without further linker lists, add a macro for defining the long help messages which uses __maybe_unused. This allows us to discard them as unreferenced as part of the link. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
6321391a |
|
01-Oct-2023 |
Simon Glass <sjg@chromium.org> |
cli: Drop #ifdefs for CONFIG_AUTO_COMPLETE in cli_readline Use a static inline and adjust the logic to avoid the need for #ifdefs in cli_readline_into_buffer() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
be595146 |
|
27-Sep-2023 |
Simon Glass <sjg@chromium.org> |
command: Include a required header in command.h This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> |
#
99970b55 |
|
06-Sep-2023 |
Marek Vasut <marek.vasut+renesas@mailbox.org> |
command: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> |
#
26f923c7 |
|
20-Mar-2023 |
Evgeny Bachinin <EABachinin@sberdevices.ru> |
cli: run_commandf(): small fixups * vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable āiā set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
d99e6f78 |
|
22-Feb-2023 |
Simon Glass <sjg@chromium.org> |
command: Don't allow commands in SPL At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
dec5777f |
|
07-Oct-2023 |
Tom Rini <trini@konsulko.com> |
command.h: Add a U_BOOT_LONGHELP macro In order to be able to discard unused long help texts without further linker lists, add a macro for defining the long help messages which uses __maybe_unused. This allows us to discard them as unreferenced as part of the link. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
6321391a |
|
01-Oct-2023 |
Simon Glass <sjg@chromium.org> |
cli: Drop #ifdefs for CONFIG_AUTO_COMPLETE in cli_readline Use a static inline and adjust the logic to avoid the need for #ifdefs in cli_readline_into_buffer() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
be595146 |
|
27-Sep-2023 |
Simon Glass <sjg@chromium.org> |
command: Include a required header in command.h This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> |
#
99970b55 |
|
06-Sep-2023 |
Marek Vasut <marek.vasut+renesas@mailbox.org> |
command: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> |
#
26f923c7 |
|
20-Mar-2023 |
Evgeny Bachinin <EABachinin@sberdevices.ru> |
cli: run_commandf(): small fixups * vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable āiā set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
d99e6f78 |
|
22-Feb-2023 |
Simon Glass <sjg@chromium.org> |
command: Don't allow commands in SPL At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
6321391a |
|
01-Oct-2023 |
Simon Glass <sjg@chromium.org> |
cli: Drop #ifdefs for CONFIG_AUTO_COMPLETE in cli_readline Use a static inline and adjust the logic to avoid the need for #ifdefs in cli_readline_into_buffer() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
be595146 |
|
27-Sep-2023 |
Simon Glass <sjg@chromium.org> |
command: Include a required header in command.h This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> |
#
99970b55 |
|
06-Sep-2023 |
Marek Vasut <marek.vasut+renesas@mailbox.org> |
command: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> |
#
26f923c7 |
|
20-Mar-2023 |
Evgeny Bachinin <EABachinin@sberdevices.ru> |
cli: run_commandf(): small fixups * vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable āiā set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
d99e6f78 |
|
22-Feb-2023 |
Simon Glass <sjg@chromium.org> |
command: Don't allow commands in SPL At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
be595146 |
|
27-Sep-2023 |
Simon Glass <sjg@chromium.org> |
command: Include a required header in command.h This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> |
#
99970b55 |
|
06-Sep-2023 |
Marek Vasut <marek.vasut+renesas@mailbox.org> |
command: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> |
#
26f923c7 |
|
20-Mar-2023 |
Evgeny Bachinin <EABachinin@sberdevices.ru> |
cli: run_commandf(): small fixups * vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable āiā set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
d99e6f78 |
|
22-Feb-2023 |
Simon Glass <sjg@chromium.org> |
command: Don't allow commands in SPL At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
99970b55 |
|
06-Sep-2023 |
Marek Vasut <marek.vasut+renesas@mailbox.org> |
command: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> |
#
26f923c7 |
|
20-Mar-2023 |
Evgeny Bachinin <EABachinin@sberdevices.ru> |
cli: run_commandf(): small fixups * vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable āiā set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
d99e6f78 |
|
22-Feb-2023 |
Simon Glass <sjg@chromium.org> |
command: Don't allow commands in SPL At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
26f923c7 |
|
20-Mar-2023 |
Evgeny Bachinin <EABachinin@sberdevices.ru> |
cli: run_commandf(): small fixups * vsnprintf() can truncate cmd, hence it makes no sense to launch such command (it's broken). Moreover, it's better to signalize to the caller about such case (for facilitating debugging or bug hunting). * Fix kernel-doc warnings: include/command.h:264: info: Scanning doc for run_commandf include/command.h:268: warning: contents before sections include/command.h:271: warning: No description found for return value of 'run_commandf' * Add printf-like format attribute to validate at compile-time the format string against parameters's type. * Fix compilation error in case of -Wall, -Werror, -Wextra: error: variable āiā set but not used [-Werror=unused-but-set-variable] * Drop extra ret variable. Signed-off-by: Evgeny Bachinin <EABachinin@sberdevices.ru> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
d99e6f78 |
|
22-Feb-2023 |
Simon Glass <sjg@chromium.org> |
command: Don't allow commands in SPL At present we compile commands into U-Boot SPL even though they cannot be used. This wastes space. Adjust the condition to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
6e7df1d1 |
|
10-Jan-2023 |
Tom Rini <trini@konsulko.com> |
global: Finish CONFIG -> CFG migration At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
30f3333d |
|
06-Jan-2023 |
Simon Glass <sjg@chromium.org> |
image: Move common image code to image_board and command We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
157861e6 |
|
11-Aug-2022 |
Tom Rini <trini@konsulko.com> |
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
|
#
be43a35b |
|
28-Jul-2022 |
John Keeping <john@metanate.com> |
boot: allow bootmeth-distro without CONFIG_NET Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
8b8accb8 |
|
01-Aug-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
74724484 |
|
13-Jul-2022 |
Simon Glass <sjg@chromium.org> |
fdt: Start a test for the fdt command Add a basic test of the 'fdt addr' command, to kick things off. This includes a new convenience function to run a command from a printf() string. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@amd.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wd@denx.de> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wd@denx.de> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wd@denx.de> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wd@denx.de> |
Initial revision |
#
185f812c |
|
19-Jan-2022 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
doc: replace @return by Return: Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@xilinx.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wdenk> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wdenk> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wdenk> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wdenk> |
Initial revision |
#
6b034487 |
|
19-Sep-2021 |
Simon Glass <sjg@chromium.org> |
command: Use a constant pointer for the help This text should never change during execution, so it makes sense to use a const char * so that it can be declared as const in the code. Update struct cmd_tbl with a const char * pointer for 'help'. We cannot make usage const because of the bmode command, used on mx53ppd for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@xilinx.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wdenk> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wdenk> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wdenk> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wdenk> |
Initial revision |
#
45cd2e55 |
|
14-Mar-2021 |
Simon Glass <sjg@chromium.org> |
command: Fix operation of !CONFIG_CMDLINE The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE is not enabled. Fix this by updating the macro to provide the 'repeatable' arugment in this case. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com> |
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org> |
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> |
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> |
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@xilinx.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org> |
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> |
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> |
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com> |
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com> |
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com> |
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> |
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com> |
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> |
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> |
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com> |
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org> |
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> |
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org> |
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de> |
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de> |
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> |
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de> |
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com> |
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> |
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de> |
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de> |
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com> |
#
04a85b3b |
|
15-Apr-2004 |
Wolfgang Denk <wdenk> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family |
#
0d498393 |
|
01-Jul-2003 |
Wolfgang Denk <wdenk> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command |
#
8bde7f77 |
|
27-Jun-2003 |
Wolfgang Denk <wdenk> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) |
#
78f6622a |
|
27-Aug-2002 |
Wolfgang Denk <wdenk> |
Initial revision |
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
18c25821 |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel image Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d3a3d44f |
|
02-Feb-2021 |
Kory Maincent <kory.maincent@bootlin.com> |
command.h: Remove extern from the header Remove the extern of the header because they are useless. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [bmeng: minor edit on the commit message] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
d422c77a |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
setexpr: Add some tests for buffer overflow and backref Add tests to check for buffer overflow using simple replacement as well as back references. At present these don't fully pass. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
7526deec |
|
01-Nov-2020 |
Simon Glass <sjg@chromium.org> |
command: Add constants for cmd_get_data_size string / error At present these values are open-coded in a few places. Add constants so the meaning is clear. Also add a comment to cmd_get_data_size() Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
09140113 |
|
10-May-2020 |
Simon Glass <sjg@chromium.org> |
command: Remove the cmd_tbl_t typedef We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <bbrezillon@kernel.org> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
288b29e4 |
|
14-Nov-2019 |
Simon Glass <sjg@chromium.org> |
common: Move command functions out of common.h Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
9fb625ce |
|
01-Aug-2019 |
Simon Glass <sjg@chromium.org> |
env: Move env_set() to env.h Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
75846445 |
|
20-May-2019 |
Bartosz Golaszewski <bgolaszewski@baylibre.com> |
cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
#
9eebaba2 |
|
27-Feb-2019 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
49d81fdf |
|
24-Feb-2019 |
AKASHI Takahiro <takahiro.akashi@linaro.org> |
cmd: env: add "-e" option for handling UEFI variables "env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
c0cf06e5 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
command: commands: Add macros to declare commands with subcmds Most cmd/xxx.c source files expose several commands through a single entry point. Some of them are doing the sub-command parsing manually in their do_<cmd>() function, others are declaring a table of sub-commands and then use find_cmd_tbl() to delegate the request to the sub command handler. In either case, the amount of code to do that is not negligible and repetitive, not to mention that almost no commands are implementing the auto-completion hook, which means most u-boot commands lack auto-completion. Provide several macros to easily define commands exposing sub-commands. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
80a48dd4 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Rework the 'cmd is repeatable' logic The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
6fb61445 |
|
03-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
common: command: Expose a generic helper to auto-complete sub commands Some commands have a table of sub-commands. With minor adjustments, complete_cmdv() is able to provide auto-completion for sub-commands (it's just about passing the table of commands instead of taking the global one). We rename this function into complete_subcmd() and implement complete_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
8a3d734b |
|
12-Oct-2018 |
Heinrich Schuchardt <xypron.glpk@gmx.de> |
common: command: fix typo %s/CMD_RET_SUCCESX/CMD_RET_SUCCESS/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
#
27eb7bce |
|
21-Jun-2018 |
Michal Simek <michal.simek@xilinx.com> |
common: command: Handle USAGE failure separately command_ret_t enum contains 3 return values but only two are handled now. Extend cmd_process_error() and handle CMD_RET_USAGE separately. These commands are affected by this change. cmd/demo.c cmd/efi.c cmd/gpio.c cmd/qfw.c cmd/x86/fsp.c test/dm/cmd_dm.c And scripts shouldn't be affected because return value is not 0. But every command implementation can choose what it is correct to pass. I would expect that RET_USAGE is called when parameters are not correctly passed (have incorrect value, missing parameters) and RET_FAILURE when correct parameters are passed but command fails. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromum.org>
|
#
83d290c5 |
|
06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
|
#
51916864 |
|
15-Feb-2018 |
Nitin Jain <nitin.jain@xilinx.com> |
arm64: zynqmp: Add support to load an app at EL1 This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
|
#
6f62d7c4 |
|
04-Aug-2017 |
Simon Glass <sjg@chromium.org> |
Kconfig: Drop CONFIG_CMD_PORTIO and associated command This command is not used by any board. It also looks quite similar to the 'iod' and 'iow' commands which use the correct I/O macros. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
#
f8bb6964 |
|
19-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Drop command-processing code when CONFIG_CMDLINE is disabled Command parsing and processing code is not needed when the command line is disabled. Remove this code in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
fb24112c |
|
13-Mar-2016 |
Simon Glass <sjg@chromium.org> |
Allow command code to compile to nothing When CONFIG_CMDLINE is disabled we need to remove all the command-line code. Most can be removed by dropping the appropriate linker lists from the images, but sub-commands must be dealt with specially. A simple mechanism is used to avoid 'unused static function' errors. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
|
#
4e42e29f |
|
13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
#
cbb2df20 |
|
07-Dec-2015 |
Tom Rini <trini@konsulko.com> |
CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes <command.h> as that's where the function declaration is. Signed-off-by: Tom Rini <trini@konsulko.com>
|
#
8b5c738b |
|
21-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
pxe: add AArch64 image support The sysboot and pxe commands currently support either U-Boot formats or raw zImages. Add support for the AArch64 Linux port's native image format too. As with zImage support, there is no auto-detection of the native image format. Rather, if the image is auto-detected as a U-Boot format, U-Boot will try to interpret it as such. Otherwise, U-Boot will fall back to a raw/native image format, if one is enabled. My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64 port, hence there's never a need to differentiate between CONFIG_CMD_ _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is definitely the native format for AArch64. Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
|
#
87b6398b |
|
07-Oct-2014 |
Simon Glass <sjg@chromium.org> |
cli: hush: Adjust 'run' command to run each line of the env var The run command treats each argument an an environment variable. It gets the value of each variable and executes it as a command. If an environment variable contains a newline and the hush cli is used, it is supposed to execute each line one after the other. Normally a newline signals to hush to exit - this is used in normal command line entry - after a command is entered we want to return to allow the user to enter the next one. But environment variables obviously need to execute to completion. Add a special case for the execution of environment variables which continues when a newline is seen, and add a few tests to check this behaviour. Note: it's not impossible that this may cause regressions in other areas. I can't think of a case but with any change of behaviour with limited test coverage there is always a risk. From what I can tell this behaviour has been around since at least U-Boot 2011.03, although this pre-dates sandbox and I have not tested it on real hardware. Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
aa69db1f |
|
12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Avoid including config.h in command.h This is not necessary and prevents using this header when building tools. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
16ff9902 |
|
26-Feb-2014 |
Simon Glass <sjg@chromium.org> |
Add cmd_process_error() to report and process errors U-Boot now uses errors defined in include/errno.h which are negative integers. Commands which fail need to report the error and return 1 to indicate failure. Add this functionality in cmd_process_error(). For now this merely reports the error number. It would be possible also to produce a helpful error message by storing the error strings in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
1a459660 |
|
08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
|
#
da620222 |
|
02-Dec-2012 |
Rob Herring <rob.herring@calxeda.com> |
bootz: un-staticize do_bootz Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
|
#
ef123c52 |
|
24-Feb-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Refactor linker-generated arrays Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
|
#
34765e88 |
|
02-Dec-2012 |
Richard Genoud <richard.genoud@gmail.com> |
cmd_time: merge run_command_and_time_it with cmd_process As far as every arch has a get_timer function, run_command_and_time_it code can now disappear. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Acked-By: Che-Liang Chiou <clchiou@chromium.org> [trini: s/ulong/unsigned long/ in command.h portion] Signed-off-by: Tom Rini <trini@ti.com>
|
#
9ad557be |
|
05-Dec-2012 |
Vadim Bendebury <vbendeb@chromium.org> |
Add console command to access io space registers Provide u-boot console functions to access IO space registers. A no thrills implementation, accessing one register at a time. For example: boot > iod 80 0080: 00000094 boot > iod.w 80 0080: 0094 boot > iod.b 80 0080: 94 boot > iow.b 0x80 12 boot > iod 0x80 0080: 00000012 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
8b493a52 |
|
16-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Discard the __u_boot_cmd section The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
|
#
6c7c946c |
|
12-Oct-2012 |
Marek Vasut <marex@denx.de> |
common: Convert the U-Boot commands to LG-arrays This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
|
#
7405a133 |
|
20-Sep-2012 |
Rob Herring <rob.herring@calxeda.com> |
combine block device load commands into common function All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
|
#
9d12d5d4 |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Add cmd_process() to process commands in one place We currently have the same code in hush.c and main.c. This brings the code into one place. As an added feature, if the command function returns CMD_RET_USAGE then cmd_process() will print a usage message for the command before returning the standard failure code of 1. ARM code size increases about 32 bytes with this clean-up. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
bdf8e34b |
|
14-Feb-2012 |
Simon Glass <sjg@chromium.org> |
Create a single cmd_call() function to handle command execution We should aim for a single point of entry to the commands, whichever parser is used. Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
d09b1787 |
|
06-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16); ... total: 0 errors, 10 warnings, 1043 lines checked Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
|
#
8edf844f |
|
17-Sep-2011 |
Simon Glass <sjg@chromium.org> |
sandbox: Force command sections to be 4-byte aligned By default sections are 16-byte aligned on some architectures, but the command name structure (struct cmd_tbl_s) does not have padding to 16 bytes. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
e84ffddb |
|
23-Apr-2011 |
Mike Frysinger <vapier@gentoo.org> |
cmd_usage: constify The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
#
67d668bf |
|
05-Jun-2011 |
Mike Frysinger <vapier@gentoo.org> |
autostart: unify duplicated logic into the bootm code Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by: Matthew McClintock <msm@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
#
722b061b |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
autocomplete: remove runtime handler install Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
#
882b7d72 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_reset: unify duplicate prototypes The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
#
7842fb7c |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootd: unify duplicate prototypes Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
#
36ebb787 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
do_bootm: unify duplicate prototypes The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
#
40b484a3 |
|
20-Oct-2010 |
Mike Frysinger <vapier@gentoo.org> |
command_t: punt unused type The recent command clean up to constify the argv option to command funcs missed the command_t type itself. This is probably because there are no build time warnings from it because no one is actually using this thing. So just punt it rather than fix it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
#
2e5167cc |
|
28-Oct-2010 |
Wolfgang Denk <wd@denx.de> |
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
|
#
620f1f6a |
|
17-Sep-2010 |
Heiko Schocher <hs@denx.de> |
relocation: fixup cmdtable fixup_cmdtable() did all work for fixing up the cmdtable, if CONFIG_RELOC_FIXUP_WORKS is not defined. CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked with Graeme Russ, and he will fix this soon. Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
|
#
54841ab5 |
|
28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified. The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
|
#
94796d85 |
|
24-May-2009 |
Wolfgang Denk <wd@denx.de> |
Make "usage" messages more helpful. In case of incorrect command invocations U-Boot used to print pretty useless "usage" messages, for example: => nand markbad Usage: nand - NAND sub-system In the result, the user would have to run the "help" command to get the (available) information about correct command usage. Change this, so that this information gets always printed. Note that this changes the user interface of all commands, but hopefully to the better. Signed-off-by: Wolfgang Denk <wd@denx.de>
|
#
2dce551e |
|
25-Mar-2009 |
Detlev Zundel <dzu@denx.de> |
command.c: Expose the core of do_help as _do_help to the rest of u-boot. Other commands implementing subcommands can reuse this code nicely. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Andreas Pfefferle <ap@denx.de>
|
#
2fb2604d |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Command usage cleanup Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
|
#
62c3ae7c |
|
27-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage() Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
|
#
6d0f6bcf |
|
16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
#
b799cb4c |
|
23-Sep-2008 |
Kumar Gala <galak@kernel.crashing.org> |
Expose command table search for sub-commands Sub-command can benefit from using the same table and search functions that top level commands have. Expose this functionality by refactoring find_cmd() and introducing find_cmd_tbl() that sub-command processing can call. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
|
#
8a40fb14 |
|
10-Sep-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
move cmd_get_data_size to command.c add CMD_DATA_SIZE macro to enable it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
#
f2302d44 |
|
06-Aug-2008 |
Stefan Roese <sr@denx.de> |
Fix merge problems Signed-off-by: Stefan Roese <sr@denx.de>
|
#
5d1d00fb |
|
25-Jul-2008 |
Stefano Babic <sbabic@denx.de> |
Add include for config.h in command.h. Because the cmd_tbl_s structure depends on the configuration file, it must be assured that config.h is included before the structure is evaluated by the compiler. If this is not certain, it could happen that the compiler generates structures of different size, depending on the fact if the source file includes <config.h> before or after <command.h>. The effect is that u-boot crashes when tries to relocate the command table (for ppc) or try to access to the command table for other architectures. The problem can happen on board-depending commands. All general commands under /common are unaffected, because they include already config.h before command.h. Signed-off-by: Stefano Babic <sbabic@denx.de>
|
#
53677ef1 |
|
20-May-2008 |
Wolfgang Denk <wd@denx.de> |
Big white-space cleanup. This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
|
#
b3631487 |
|
08-Jul-2007 |
Jon Loeliger <jdl@freescale.com> |
Remove references to the old cmd_confdefs.h include file. Signed-off-by: Jon Loeliger <jdl@freescale.com>
|
#
04a85b3b |
|
15-Apr-2004 |
wdenk <wdenk> |
* Patches by Pantelis Antoniou, 30 Mar 2004: - add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family
|
#
0d498393 |
|
01-Jul-2003 |
wdenk <wdenk> |
Patch by Kenneth Johansson, 30 Jun 2003: get rid of MK_CMD_ENTRY macro; update doc/README.command
|
#
8bde7f77 |
|
27-Jun-2003 |
wdenk <wdenk> |
* Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
|
#
78f6622a |
|
27-Aug-2002 |
wdenk <wdenk> |
Initial revision
|