CPU serial in /proc/cpuinfo on iMX7

I’m trying to get the CPU ID on Colibri iMX7D. The result of cat /proc/cpuinfo is:

Hardware	: Freescale i.MX7 Dual (Device Tree)
Revision	: 0000
Serial	  : 0000000000000000

Why is the serial field empty?
I see that u-boot has the option CONFIG_SERIAL_TAG disabled. When I’ve tried to enable it (in colibri_imx7.h) and compile the u-boot, then there is conflict between get_board_serial functions in tdx-common.c and soc.c. I tried to manually disable each of the conflicting functions. It helped (u-boot is compiling correctly) but cpuinfo still has serial set to zeros.

we’re using SoC id:

Remember that procfs is technically deprecated, and use of it should be avoided.

Do you have valid config block updated with valid serial number ?
If not update the config block via U-Boot terminal by running the cmd:

# cfgblock create

The serial number available in cpuinfo is set by U-Boot from the data available in config block.

You can get the Toradex serial number from the device tree using the standard serial-number property:

cat /proc/device-tree/serial-number

We also added two Toradex specific properties:

cat /proc/device-tree/toradex,board-rev
cat /proc/device-tree/toradex,product-id

If the procfs is deprecated, the serial number from the white sticker can be obtained this way as well:

cat /sys/firmware/devicetree/base/serial-number

hi @cicicok

Thanks for your valuable input.

Best regards,