[PATCH] cmd: mem: add function for getting ram size for use in scripts
Tom Rini
trini at konsulko.com
Sat Jan 17 18:17:49 CET 2026
On Sat, Jan 17, 2026 at 06:08:54PM +0100, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w at public-files.de>
>
> Add a command for getting detected ram size with possibility to write
> to environment variable.
>
> example usage:
>
> BPI-R4> msize
> 4294967296
> BPI-R4> msize m
> 4096m
> BPI-R4> msize g
> 4g
> BPI-R4> msize g ramsize
> BPI-R4> printenv ramsize
> ramsize=4
> BPI-R4>
>
> board with 8GB ram:
>
> BPI-R4> msize
> 8589934592
> BPI-R4> msize m
> 8192m
> BPI-R4> msize g
> 8g
> BPI-R4> msize g ramsize
> BPI-R4> printenv ramsize
> ramsize=8
> BPI-R4>
>
> Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
> ---
> cmd/mem.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
New commands should get a new Kconfig entry to enable them please,
thanks.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260117/aea4272b/attachment.sig>
More information about the U-Boot
mailing list