[PATCH v1 0/1] cmd: setexpr: add dec operation for converting variable to decimal
roland.gaudig-oss at weidmueller.com
roland.gaudig-oss at weidmueller.com
Tue Jun 22 15:50:41 CEST 2021
From: Roland Gaudig <roland.gaudig at weidmueller.com>
U-Boot uses almost everywhere hexadecimal numbers. But some bootargs
passed to Linux are expecting decimal numbers. As long as the values
are in the range 0 to 9 it is sufficient to just strip 0x from the
number. But for greater values a method for converting numbers to
decimal is needed.
This patch adds a dec operation to the setexpr command which converts
the input value into decimal and stores it into the variable named
name.
setexpr name dec value
Roland Gaudig (1):
cmd: setexpr: add dec operation for converting variable to decimal
cmd/setexpr.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
--
2.25.1
More information about the U-Boot
mailing list