summaryrefslogtreecommitdiff
path: root/cmd/Kconfig
diff options
context:
space:
mode:
authorFrank Wunderlich <[email protected]>2026-02-04 19:40:42 +0100
committerTom Rini <[email protected]>2026-02-07 11:51:33 -0600
commite202eca183b0f1d6747b934482dc6249abdd742b (patch)
treec4369e3a05c594dae1ae1feeb04e2faa3d82047c /cmd/Kconfig
parent6b2d05748cf3cd6ba417a96c00602b0122e10af6 (diff)
cmd: mem: add command for getting ram size for use in scripts
Add a command for getting detected ram size with possibility to assign it to an environment variable. example usage: BPI-R4> memsize 4096 MiB BPI-R4> memsize memsz BPI-R4> printenv memsz memsz=4096 BPI-R4> board with 8GB ram: BPI-R4> memsize 8192 MiB BPI-R4> memsize memsz BPI-R4> printenv memsz memsz=8192 BPI-R4> Signed-off-by: Frank Wunderlich <[email protected]>
Diffstat (limited to 'cmd/Kconfig')
-rw-r--r--cmd/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 595ac49da41..f12fcf6631e 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -940,6 +940,13 @@ config CMD_MEMINFO_MAP
See doc/usage/cmd/meminfo.rst for more information.
+config CMD_MEMSIZE
+ bool "memsize"
+ depends on CMD_MEMINFO
+ help
+ Get RAM via command for use in scripts. Print or assign decimal value
+ in MiB to environment variable.
+
config CMD_MEMORY
bool "md, mm, nm, mw, cp, cmp, base, loop"
default y