From f6c2cec797696c290cd7bcb7b78a89d2fe5bb9f4 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Wed, 14 Oct 2020 16:46:20 +0200 Subject: [PATCH] sysinfo: add 0x prefix to SEC_CONFIG_WORD to fix conditional expression Commit c24d1d96 ("sysinfo: adapt script after removal of deprecated fsl_otp driver") introduced a mistake masking the SEC_CONFIG[1] bit read from the OTP. This commit fix the read command to force it in hex format and finally match with the mask in the script. https://jira.digi.com/browse/DEL-7263 Signed-off-by: Arturo Buzarra --- meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo index 36151a8ed..cae3a49e5 100755 --- a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo +++ b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo @@ -263,7 +263,7 @@ make_report(){ else if [ -e ${OTP_PATH}/nvmem ]; then # Check SEC_CONFIG on OCOTP_CFG5 (ADDR=6) bit 1. - SEC_CONFIG_WORD=$(dd if=${OTP_PATH}/nvmem of=/dev/stdout bs=4 skip=6 count=1 status=none | hexdump -n 4 -v -e '1/4 "%08x\n"') + SEC_CONFIG_WORD=$(dd if=${OTP_PATH}/nvmem of=/dev/stdout bs=4 skip=6 count=1 status=none | hexdump -n 4 -v -e '1/4 "0x%08x\n"') if [ "$((${SEC_CONFIG_WORD} & 0x2))" != "0" ]; then echo "Security status: [CLOSED]" else