[PATCH v2 00/10] cmd: Fix 'md' and add a memory-search command

Simon Glass sjg at chromium.org
Mon Jun 8 04:43:27 CEST 2020


This series implements a new memory-search command called 'ms'. It allows
searching memory for hex and string data.

It also cleans up the use of MEM_SUPPORT_64BIT_DATA since this is
currently reliant on including compiler.h and failes silently if it is
not.

Note: The fix for 'md.q' in the v1 series has been moved to a separate
patch, so it can be applied separately from this series.

Changes in v2:
- Use MEM_SUPPORT_64BIT_DATA instead of a new define
- Add new patch to check part of a console line or skip it
- Rename the Kconfig to CONFIG_CMD_MEM_SEARCH
- Use a separate var for the remaining search length
- Drop unnecessary ':' in the U_BOOT_CMD
- Enable the command for sandbox
- Split the argc/argv changes over two lines
- Add the missing cover-letter tags
- Correct a bug when auto-repeating right at the end (and add test)
- Move tests to a new suite of their own, instead of DM tests
- Add -q flag to the 'quiet' test to test operation when console is enabled

Simon Glass (10):
  Update MEM_SUPPORT_64BIT_DATA to be always defined
  cmd: mem: Use a macro to avoid #ifdef in help
  cmd: mem: Drop #ifdef for MEM_SUPPORT_64BIT_DATA
  display_options: Drop #ifdef for MEM_SUPPORT_64BIT_DATA
  command: Drop #ifdef for MEM_SUPPORT_64BIT_DATA
  test: Add a way to check part of a console line or skip it
  dm: test: Rename test flags to be generic
  console: Always define the console-recording functions
  test: Add a flag for tests that need console recording
  cmd: Add a memory-search command

 README                    |  10 ++
 cmd/Kconfig               |  14 ++
 cmd/mem.c                 | 338 +++++++++++++++++++++++---------------
 common/command.c          |   9 +-
 common/console.c          |   4 +-
 configs/sandbox_defconfig |   1 +
 doc/README.commands       |   2 +-
 include/compiler.h        |   4 +-
 include/console.h         |  39 ++++-
 include/dm/test.h         |   9 -
 include/test/suites.h     |   1 +
 include/test/test.h       |  11 ++
 include/test/ut.h         |  59 +++++++
 lib/display_options.c     |  18 +-
 test/Makefile             |   1 +
 test/cmd/Makefile         |   6 +
 test/cmd/mem.c            |  20 +++
 test/cmd/mem_search.c     | 325 ++++++++++++++++++++++++++++++++++++
 test/cmd_ut.c             |  12 ++
 test/dm/acpi.c            |  18 +-
 test/dm/adc.c             |  16 +-
 test/dm/audio.c           |   2 +-
 test/dm/axi.c             |   6 +-
 test/dm/blk.c             |  10 +-
 test/dm/board.c           |   2 +-
 test/dm/bootcount.c       |   2 +-
 test/dm/bus.c             |  26 +--
 test/dm/cache.c           |   2 +-
 test/dm/clk.c             |   6 +-
 test/dm/clk_ccf.c         |   2 +-
 test/dm/core.c            |  30 ++--
 test/dm/cpu.c             |   2 +-
 test/dm/devres.c          |  12 +-
 test/dm/dma.c             |   6 +-
 test/dm/dsi_host.c        |   2 +-
 test/dm/eth.c             |  16 +-
 test/dm/fdtdec.c          |   2 +-
 test/dm/firmware.c        |   2 +-
 test/dm/gpio.c            |  16 +-
 test/dm/hwspinlock.c      |   2 +-
 test/dm/i2c.c             |  16 +-
 test/dm/i2s.c             |   2 +-
 test/dm/irq.c             |   8 +-
 test/dm/led.c             |  12 +-
 test/dm/mailbox.c         |   2 +-
 test/dm/mdio.c            |   2 +-
 test/dm/mdio_mux.c        |   2 +-
 test/dm/misc.c            |   2 +-
 test/dm/mmc.c             |   4 +-
 test/dm/nop.c             |   2 +-
 test/dm/ofnode.c          |  12 +-
 test/dm/ofread.c          |   2 +-
 test/dm/osd.c             |   4 +-
 test/dm/p2sb.c            |   2 +-
 test/dm/panel.c           |   2 +-
 test/dm/pch.c             |   4 +-
 test/dm/pci.c             |  24 +--
 test/dm/pci_ep.c          |   2 +-
 test/dm/phy.c             |   6 +-
 test/dm/pmc.c             |   2 +-
 test/dm/pmic.c            |  10 +-
 test/dm/power-domain.c    |   2 +-
 test/dm/pwm.c             |   2 +-
 test/dm/ram.c             |   2 +-
 test/dm/regmap.c          |  10 +-
 test/dm/regulator.c       |  20 +--
 test/dm/remoteproc.c      |   4 +-
 test/dm/reset.c           |   6 +-
 test/dm/rng.c             |   2 +-
 test/dm/rtc.c             |   8 +-
 test/dm/serial.c          |   2 +-
 test/dm/sf.c              |   4 +-
 test/dm/smem.c            |   2 +-
 test/dm/sound.c           |   4 +-
 test/dm/spi.c             |   4 +-
 test/dm/spmi.c            |   6 +-
 test/dm/syscon.c          |   6 +-
 test/dm/sysreset.c        |   8 +-
 test/dm/tee.c             |   2 +-
 test/dm/test-fdt.c        |  46 +++---
 test/dm/test-main.c       |  10 +-
 test/dm/timer.c           |   2 +-
 test/dm/usb.c             |  10 +-
 test/dm/video.c           |  26 +--
 test/dm/virtio.c          |   8 +-
 test/dm/wdt.c             |   2 +-
 test/lib/lmb.c            |  18 +-
 test/ut.c                 |  22 +++
 88 files changed, 1005 insertions(+), 420 deletions(-)
 create mode 100644 test/cmd/Makefile
 create mode 100644 test/cmd/mem.c
 create mode 100644 test/cmd/mem_search.c

-- 
2.27.0.278.ge193c7cf3a9-goog



More information about the U-Boot mailing list