Identify device when booting in Serial Downloader mode

Hi,

We have a huge number of devices and we need to register them automatically in an internal inventory. We’re trying to unequivocally identify each device before flashing it, as a preliminary step in the flashing procedure. Hence, the device is booted in Serial Downloader mode.

Then, in that boot mode we need to gather at least this information:

  • MAC
  • Module Serial Number, or any other identifier that never changes and is unique for each device.

How could we get this information? We will need to include this gathering to a script to be run automatically.

Thanks in advance,
Jose

2 Likes

Are your devices being fused with the MAC address at the factory, or is the eeprom being programmed with TLV factory data?

Currently, we’ve received a first batch programmed with TLV factory data, but we expect to receive the big batch fused. What would be the process to obtain that information in each case?

In the case of MAC, we see it by:

  • booting from eMMC
  • connecting serial port with Minicom
  • running ‘net list’

When booting in Serial Downloader mode, we’ve defined a custom ‘.lst’ file derived from the original ‘emmc_burn_all.lst’ containing 'FB: ucmd net list ’ and executed the ‘uuu’. However:

  • The output is not seen in stdout
  • We see the output in the Minicom console, but, the MAC that appears there is clearly wrong as it reports that:

eth1 : ethernet@30bf0000 00:00:00:00:00:00 active

How can we see and gather the output of uuu through the USB port, and get the proper value?

Regarding the command ‘printenv’. Adding it to the ‘.lst’ file and running it with ‘uuu’ in Serial Downloader mode reports different variables than running it directly from u-boot when booting from eMMC.

Booting from eMMC:

eth1addr=6a:29:f9:3e:a9:3c
ethact=ethernet@30bf0000
ethprime=eth1

Booting in Serial Downloader mode, the unique variable referring to the ethernet is:

ethprime=eth1

Surfing in the doc it says that MAC can be programmed in the TLV (source):

"The EEPROM can be programmed from the U-Boot cli accordingly by the following commands:

tlv_eeprom set 0x24 '12:34:56:78:9a:bc'

However, when I try to run tlv_eeprom in u-boot, well in the eMMC or in the uSD, it reports that:

Unknown command ‘tlv_eeprom’ - try ‘help’

And the help command shows no command related with tlv

Also, in that doc (source), it points that there are some variables programmed in TLV such as:

TLV_CODE_SERIAL_NUMBER (mandatory)
TLV_CODE_DEVICE_VERSION (mandatory) Board Revision, incremented when parts or layout changes; MAJOR.MINOR revisions are encoded by storing MAJOR in the four most significant bits, MINOR in the four least significant bits.

How can I read that values? They are not in printenv.

Thanks in advance

Please @jnettlet , could you provide us some light in this topic?