Serial number not shows after closed device

Hi,
I closed the device and still serial number is not shown.

Environment size: 2928/131067 bytes
=> trustfence status

  • SRK fuses: [PROGRAMMED]
    Key 0: [OK]
    Key 1: [OK]
    Key 2: [OK]
    Key 3: [OK]
  • Secure boot: [CLOSED]
  • Encrypted U-Boot: [YES]
  • HAB events: [NO ERRORS]
    =>

KPA_ENVIEW0000 login: root
root@KPA_ENVIEW0000:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5

Hardware : Freescale i.MX6 Ultralite (Device Tree)
Revision : 0000
Serial : 0000000000000000

Can you show me da way how can I do this?

Regards,
Adrian

The Serial Number is one of the HWID fields programmed into the OTP bits during manufacturing:

These bits can be later read on Linux with this command:

~# cat /sys/fsl_otp/HW_OCOTP_MAC0
0x40229ee5

Serial number can be obtained by masking the result of this command with 0xFFFFF.

This field is also inserted in the device tree by U-Boot. Can be read directly with the following command:

~# cat /proc/device-tree/digi,hwid,sn
171749

I believe you should also see it with sysinfo command

from u-boot run
hwid read

Thanks Leonid, every command works.

But what about serial number in /proc/cpuinfo, is it there shown the same number as from yours commands?

Can you also tell me why serial is written in “HW_OCOTP_MAC0” as this is register for MAC address?

For now I’m reading HW_OCOTP_CFG0 and HW_OCOTP_CFG1 to obtain serial number.

Thanks and regards,
Adrian

I had a similar problem and I used this command:

~# cat /sys/fsl_otp/HW_OCOTP_MAC0
0x40229ee5