Attention is currently required from: Martin L Roth, Zheng Bao.

Bao Zheng would like Zheng Bao to review this change.

View Change

top/ add _tohex

Get string of hex value of a given number.

Change-Id: I6d3525db19089938897b9d19ad9875bb07e0eecf
Signed-off-by: Zheng Bao <>
1 file changed, 13 insertions(+), 0 deletions(-)

git pull ssh:// refs/changes/53/72953/1
diff --git a/ b/
index 96121d4..7258043 100644
--- a/
+++ b/
@@ -141,6 +141,7 @@
# toupper: returns the value in all uppercase
# ws_to_under: returns the value with any whitespace changed to underscores
_toint=$(shell printf "%d" $1)
+_tohex=$(shell printf 0x"%x" $1)
_int-add2=$(shell expr $(call _toint,$1) + $(call _toint,$2))
int-add=$(if $(filter 1,$(words $1)),$(strip $1),$(call int-add,$(call _int-add2,$(word 1,$1),$(word 2,$1)) $(wordlist 3,$(words $1),$1)))
int-subtract=$(if $(filter 1,$(words $1)),$(strip $1),$(shell expr $(call _toint,$(word 1,$1)) - $(call _toint,$(word 2,$1))))

To view, visit change 72953. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6d3525db19089938897b9d19ad9875bb07e0eecf
Gerrit-Change-Number: 72953
Gerrit-PatchSet: 1
Gerrit-Owner: Bao Zheng <>
Gerrit-Reviewer: Martin L Roth <>
Gerrit-Reviewer: Zheng Bao
Gerrit-Attention: Martin L Roth <>
Gerrit-Attention: Zheng Bao
Gerrit-MessageType: newchange