summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2019-01-25cmd: ximg: Invert check for fit image compressionStefan Theil
The imgextract command runs a number of checks of the specified fit. Where it checks for a load address for compressed images the logic in the expression is inverted as fit_image_check_comp returns 1 on success and not 0.
2019-01-18cmd: mtd: fix compilation warning for help when SYS_LONGHELP=nQuentin Schulz
cmd/mtd.c:447:13: warning: ‘mtd_help_text’ defined but not used [-Wunused-variable] static char mtd_help_text[] = ^~~~~~~~~~~~~ When SYS_LONGHELP is not defined. After looking at how other commands work, we should surround the whole help text (even its declaration) with an #ifdef CONFIG_SYS_LONGHELP, since it's compiled out when calling _CMD_HELP[1] on the help text variable argument to U_BOOT_CMD. [1] https://elixir.bootlin.com/u-boot/latest/source/include/command.h#L181 Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-01-15cmd: adc: Use the sub-command infrastructureBoris Brezillon
And you get sub-command auto-completion for free. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-01-15cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commandsBoris Brezillon
It's way simpler this way, and we also gain auto-completion support for free (MTD name auto-completion has been added with mtd_name_complete()) Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-01-15common: command: Rework the 'cmd is repeatable' logicBoris Brezillon
The repeatable property is currently attached to the main command and sub-commands have no way to change the repeatable value (the ->repeatable field in sub-command entries is ignored). Replace the ->repeatable field by an extended ->cmd() hook (called ->cmd_rep()) which takes a new int pointer to store the repeatable cap of the command being executed. With this trick, we can let sub-commands decide whether they are repeatable or not. We also patch mmc and dtimg who are testing the ->repeatable field directly (they now use cmd_is_repeatable() instead), and fix the help entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-01-15cmd: zip: use correct format codeHeinrich Schuchardt
dst_len is defined as unsigned long. So use %lu for printf(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15cmd: unzip: use correct format codeHeinrich Schuchardt
src_len is defined as unsigned long. So use %lu for printf(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15cmd: ubi: remove unreachable codeHeinrich Schuchardt
It does not make sense to check if argc < 2 a second time, especially after accessing argv[1]. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15cmd: tpm-v2: use correct format codeHeinrich Schuchardt
updates is defined as unsigned int. So use %u for printf(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15cmd: sf: use correct printf codeHeinrich Schuchardt
test->time_ms[] is defined as unsigned. So use %u for printf(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-15cmd: nvedit: use correct format codeHeinrich Schuchardt
len is defined as unsigned. So use %u for printf(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-01-15cmd: gpio: use correct printf codeHeinrich Schuchardt
gpio is defined as unsigned int. So we should use %u when calling printf(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-15cmd: mmc: Invalidate MMC block cache after initMarek Vasut
Make sure the block cache is cleared for the MMC device after it was reinitialized to avoid having any stale data in the cache, like e.g. partition tables or such. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-15cmd: mmc: Force mmc reinit when no card presentMarek Vasut
In case the card is removed, force-init the MMC to start the internal machinery which deregisters and invalidate the MMC device. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2018-12-31fs: cbfs: Add missing standard CBFS component typesBin Meng
Current CBFS component type list is incomplete. Add missing ones. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-12-31fs: cbfs: Make all CBFS_TYPE_xxx macros consistentBin Meng
At present there are 2 macros that are named as CBFS_COMPONENT_xxx. Change them to CBFS_TYPE_xxx for consistency. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-12-15cmd: Move the "dm" command from test/dm/ to cmd/Tom Rini
The "dm" command under CONFIG_CMD_DM should live under cmd/ rather than test/dm/ so move it. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-12-13dm: sound: Complete migration to driver modelSimon Glass
All users of sound are converted to use driver model. Drop the old code and the CONFIG_DM_SOUND option. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-13dm: sound: Create a uclass for soundSimon Glass
The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-12-10Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini
- DM_I2C_COMPAT removal for all ti platforms from Jean-Jacques Hiblot - Fix in i2c command help output from Chirstoph Muellner.
2018-12-10Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
- DWC3 and UDC cleanup
2018-12-10cmd: i2c: Fix help output of i2c command.Christoph Muellner
In case SYS_I2C or DM_I2C are defined, then the "i2c " prefix of the "i2c crc32" command is missing. This patch addresses this, so that users can't get confused by the "crc32" command. Without the patch we get => i2c help i2c - I2C sub-system Usage: i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info crc32 chip address[.0, .1, .2] count - compute CRC32 checksum i2c dev [dev] - show or set current I2C bus [...] With the patch we get => i2c help i2c - I2C sub-system Usage: i2c bus [muxtype:muxaddr:muxchannel] - show I2C bus info i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum i2c dev [dev] - show or set current I2C bus ... Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2018-12-10cmd: Kconfig: Do not include EEPROM if DM_I2C is used without DM_I2C_COMPATJean-Jacques Hiblot
The implementation of the EEPROM commands does not support the DM I2C API. Prevent compilation breakage by not enabling it if the non-DM API is not available (if DM_I2C is used without DM_I2C_COMPAT) Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2018-12-07usb: gadget: Do not call board_usb_xxx() directly in USB gadget driversJean-Jacques Hiblot
Add 2 functions to wrap the calls to board_usb_init() and board_usb_cleanup(). This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2018-12-07ensure active menuitem is inside menuFrank Wunderlich
Hi, setting active menuitem currently can be outside of menu which results in invisible selection attached Patch fixes this regards Frank >From 1d9c4cb8b3e2dd9b0a7a6a2d4a21684d0a099dbf Mon Sep 17 00:00:00 2001 From: Frank Wunderlich <frank-w@public-files.de> Date: Sun, 2 Dec 2018 11:23:53 +0100 Subject: [PATCH] ensure active menuitem is inside menu if active menuitem is defined via environment var it can be outside the menu (>=menuitem-count) this patch resets this definition back to 0 Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2018-12-05Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini
- Various MTD fixes from Boris - Zap various unused / legacy paths. - pxa3xx NAND update from Miquel Signed-off-by: Tom Rini <trini@konsulko.com>
2018-12-05Merge tag 'video-updates-for-2019.01-rc2' of git://git.denx.de/u-boot-videoTom Rini
video, bmp and cls command updates
2018-12-04cmd: bmp: manage centered displayPatrick Delaunay
Allow to display BMP at the middle of the screen. 'm' means "middle" as it is done for the splashscreen variable: splashpos=m,m Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-12-04cmd: add clear screen 'cls' commandAnatolij Gustschin
Add common clear screen command for configurations CONFIG_DM_VIDEO, CONFIG_LCD and CONFIG_CFB_CONSOLE. Remove the existing cls command implementation from lcd.c code and activate the command for all boards enabling CONFIG_LCD for compatibility reasons. Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested-by: Patrick.Delaunay <patrick.delaunay@free.fr>
2018-12-03Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini
Patch queue for efi - 2018-12-03 This release is fully packed with lots of glorious improvements in UEFI land again! - Make PE images more standards compliant - Improve sandbox support - Improve correctness - Fix RISC-V execution on virt model - Honor board defined top of ram (fixes a few boards) - Imply DM USB access when distro boot is available - Code cleanups
2018-12-03eeprom: Add device model based I2C support to eeprom commandLukasz Majewski
After this change the 'eeprom' command can be used with DM aware boards. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-12-02efi_loader: create fdt reservation before copyHeinrich Schuchardt
When copying the device we must ensure that the copy does not fall into a memory area reserved by the same. So let's change the sequence: first create memory reservations and then copy the device tree. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: fix memory mapping for sandboxHeinrich Schuchardt
The sandbox is using a virtual address space which is neither the physical address space of the operating system nor the virtual address space in which Linux aplications live. The addresses used insided the flattened device tree use this sandbox virtual address space. The EFI subsystem uses the virtual address space of the operating system and this is where the fdt is stored. Fix all incorrect addresses for the fdt in cmd/bootefi.cmd. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: macro efi_size_in_pages()Heinrich Schuchardt
When allocating EFI memory pages the size in bytes has to be converted to pages. Provide a macro efi_size_in_pages() for this conversion. Use it in the EFI subsystem and correct related comments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Rename bootefi_test_finish() to bootefi_run_finish()Simon Glass
This function can be used from do_bootefi_exec() so that we use mostly the same code for a normal EFI application and an EFI test. Rename the function and use it in both places. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Create a function to set up for running EFI codeSimon Glass
There is still duplicated code in efi_loader for tests and normal operation. Add a new bootefi_run_prepare() function which holds common code used to set up U-Boot to run EFI code. Make use of this from the existing bootefi_test_prepare() function, as well as do_bootefi_exec(). Also shorten a few variable names. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Split out test init/uninit into functionsSimon Glass
The functions in bootefi are very long because they mix high-level code and control with the low-level implementation. To help with this, create functions which handle preparing for running the test and cleaning up afterwards. Also shorten the awfully long variable names here. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi: Check for failure to create objects in selftestSimon Glass
At present a few error conditions are not checked. Before refactoring this code, add some basic checks. Note that this code still leaks memory in the event of error. This will be tackled after the refactor. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: carving out memory reservationsHeinrich Schuchardt
The "Devicetree Specification 0.2" does not prescribe that memory reservations must be EFI page aligned. So let's not make such an assumption in our code. Do not carve out the pages for the device tree. This memory area is already marked as EFI_RUNTIME_SERVICES_DATA. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: memory reservation for fdtHeinrich Schuchardt
In copy_fdt() we allocate EFI pages for the fdt plus extra 12 KiB as EFI_RUNTIME_SERVICES_DATA. Afterwards in efi_install_fdt() we overwrite part of this memory allocation by marking it as EFI_BOOT_SERVICES_DATA. Remove the code marking the fdt as EFI_BOOT_SERVICES_DATA. Cf. commit 17ff6f02f5ad ("efi_loader: store DT in EFI_RUNTIME_SERVICES_DATA memory") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: fix typosHeinrich Schuchardt
Fix typos in EFI subsystem comments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: add efi_dp_from_name()AKASHI Takahiro
Factor out efi_set_bootdev() and extract efi_dp_from_name(). This function will be used to set a boot device in efishell command. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: rename parent to headerHeinrich Schuchardt
Rename the component parent of some EFI objects to header. This avoids misunderstandings. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02efi_loader: typedef struct efi_object *efi_handle_tHeinrich Schuchardt
All our handles point to a struct efi_object. So let's define the efi_handle_t accordingly. This helps us to discover coding errors much more easily. This becomes evident by the corrections to the usage of handles in this patch. Rename variable image_handle to image_obj where applicable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-11-29tpm: Convert to use a device parameterSimon Glass
At present many TPM calls assume there is only one TPM in the system and look up this TPM themselves. This is inconsistent with driver model, which expects all driver methods to have a device parameter. Update the code to correct this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-29cmd, fdt: add subcommand "get" to fdt headerHeiko Schocher
store fdt header member with name <member> in U-Boot Environment variable with name <var>. for example to get the total length of the fdt and store it in filesize, call: fdt header get filesize totalsize For membernames look into fdt header definition at scripts/dtc/libfdt/libfdt.h Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-27spi: Remove unused mpc8xx codeJagan Teki
- spi_init_f - spi_init_r - spi_read - spi_write these spi calls are exclusively for mpc8xx, but the relevant driver is not available so remove it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2018-11-26add default-option to bootmenuFrank Wunderlich
with this patch the selected Entry in bootmenu can be set by environment-var bootmenu_default=<number> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
2018-11-26spl: Add support for passing handoff info to U-Boot properSimon Glass
There is some basic informaton that SPL normally wants to pass through to U-Boot, such as the SDRAM size and bank information. Mkae use of the new bloblist structure for this. Add a new 'handoff' blob which is set up in SPL and passed to U-Boot proper. Also adda test for sandbox_spl that checks that this works correctly and a new 'sb' command to show the information passed from SPL. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-26sandbox: Add a new 'sb' commandSimon Glass
The old 'sb' command was deprecated in 2015 and replaced with 'host'. It is useful to be able to access some internal sandbox state, particularly for testing. Resurrect the old command and provide a way to print some basic state information (currently just the arguments to sandbox). Signed-off-by: Simon Glass <sjg@chromium.org>