Skip to contentSkip to conversation

cmd: mem: Add a command to fill the memory with random data

PATCH New Jean-Jacques Hiblot 2 participants 2 messages Jul 2, 2019 – Jul 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 cmd: mem: Add a command to fill the memory with random data

This command fills the memory with data produced by rand().

---
changes in v3:
- Add a new CONFIG option that depends on CMD_MEM

changes in v2:
- Do not include the command if CONFIG_LIB_RAND is not set
- make do_random() static

 cmd/Kconfig |  7 +++++++
 cmd/mem.c   | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)
cmd/Kconfig +7 -0
index cda7931fe3..e180c8decd 100644
@@ -550,6 +550,13 @@ config CMD_MEMORY
 	    base - print or set address offset
 	    loop - initialize loop on address range
 
+config CMD_RANDOM
+	bool "random"
+	default y
+	depends on CMD_MEMORY && (LIB_RAND || LIB_HW_RAND)
+	help
+	  random - fill memory with random data
+
 config CMD_MEMTEST
 	bool "memtest"
 	help
cmd/mem.c +52 -0

61 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/1 cmd: mem: Add a command to fill the memory with random data

Quoted 3 lines · Jean-Jacques Hiblot

This command fills the memory with data produced by rand().

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190718/ea30835e/attachment.sig>