Difference between revisions of "ConfigID management (BELK/BXELK)"

From DAVE Developer's Wiki
Jump to: navigation, search
 
(8 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
{{Applies To Bora}}
 
{{Applies To Bora}}
 
{{Applies To BoraX}}
 
{{Applies To BoraX}}
 +
{{Applies To BoraLite}}
 
{{InfoBoxBottom}}
 
{{InfoBoxBottom}}
  
Line 15: Line 16:
 
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|3.0.0]]
 
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|3.0.0]]
 
|First release
 
|First release
 +
|-
 +
|2.0.0
 +
|December 2016
 +
|[[Bora_Embedded_Linux_Kit_(BELK)#BXELK_software_components#BELK_3.0.2_.2F_BXELK_1.0.1|3.0.2 / 1.0.1]]<br>[[Bora_Embedded_Linux_Kit_(BELK)#BXELK_software_components#BELK_4.0.0_.2F_BXELK_2.0.0|4.0.0 / 2.0.0]]
 +
|Changed page name
 +
|-
 +
|2.1.0
 +
|October 2019
 +
|[[Bora_Embedded_Linux_Kit_(BELK)#BXELK_software_components#BELK_4.1.0|4.1.0]]
 +
|Added BORA Lite
 
|-
 
|-
 
|}
 
|}
  
==Instructions==
+
<section begin=BELK/>
It is assumed that the development environment has been set up properly as described [[Build_system_(BELK)|here]].
+
==ConfigID management==
 +
''ConfigID'' is a new feature of DAVE Embedded Systems products. It's main purpose is providing an automatic mechanism for the identification of the product model and configuration.
  
ConfigID is a new feature of DAVE Embedded Systems products. It's main purpose is providing an automatic mechanism for the identification of the product model and configuration.
+
General information about ''ConfigID'' are provided [[ConfigID_and_UniqueID|here]]. The following sections details some Bora/BoraX specific information.
With ConfigID, we aim at:
+
===ConfigID hardware implementation on Bora/BoraX/BoraLite===
completing the hardware configuration information that the software can't normally auto-detect (i.e. RAM chip version,...), implementing a dedicated reliable detect procedure
 
when required, overriding the auto-detected hardware configuration information
 
When implemented, this mechanism allows for:
 
initializing in the proper way the hardware platform, based on the specific features and parameters of the product, using a common software base (eg: a typical case is the SDRAM controller parameters, which must be configured by U-Boot depending on the particular memory chip, which can be different for the various SOM models)
 
getting the complete hardware configuration (combining ConfigID with the information collectable at runtime) of a product deployed on the field
 
In simple words, model identification means the capability of reading a numerical code, stored in an available device (SOC's OTP , I2C EEPROM, 1-wire memories, protected NOR flash, etc.)
 
There are two ConfigIDs:
 
SOM ConfigID: which reflects the characteristics of the SOM (stored on the SOM itself)
 
Carrier Board (CB) ConfigID: which reflects the characteristics of the carrier board that hosts the SOM (stored on the carrier board itself and read by the SOM at boot time)
 
An additional attribute is UniqueID, which is a read-only code which univocally identifies a single product and is used for traceability.
 
3.4.8.1 Customer's action
 
DAVE Embedded Systems recommends to be up-to-date with Official SOM's BSPs for taking advantages of ConfigID/UniqueId features: this is the only required action.
 
ConfigID advantage: to allow U-Boot bootloader to be executed only with the correct configuration (if the U-Boot loaded is not the proper one, it may stop execution avoiding incorrect behaviour)
 
UniqueID advantage: to trace univocally each individual SOMs and, in turn, all the on-the-field equipments
 
3.4.8.2 ConfigID values
 
ConfigID is a N-bit (typically N>8) signed integer, that can have the following values:
 
< 0: error
 
-1: not initialized
 
= 0: ConfigID legacy
 
for prototypes (ConfigID not yet defined) or for products manufactured before the introduction of the ConfigID feature
 
> 0: valid ConfigID
 
values are reported accordingly with the specific product table
 
3.4.8.3 ConfigID hardware implementation on Bora
 
 
BORA uses the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)
 
BORA uses the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)
3.4.8.4 ConfigID software implementation on Bora
+
==== ConfigID on BoraLite====
 +
For [[BORA Lite SOM | BORA Lite]] module configured for booting from NAND, the ConfigID is stored on internal I2C EPROM: see [[ConfigID_and_UniqueID#DAVE_Embedded_Systems.27_hardware_implementation | here]] for more information.
 +
 
 +
===ConfigID software implementation on Bora/BoraX/BoraLite===
 
U-Boot integrates the software routines for reading and displaying the ConfigID. Hereunder an example of SOM ConfigID at startup:
 
U-Boot integrates the software routines for reading and displaying the ConfigID. Hereunder an example of SOM ConfigID at startup:
 +
<pre>
 
U-Boot 2014.07 (Jul 24 2015 - 14:30:55) [belk-2.2.0]
 
U-Boot 2014.07 (Jul 24 2015 - 14:30:55) [belk-2.2.0]
  
Line 66: Line 59:
 
Net:  Gem.e000b000
 
Net:  Gem.e000b000
 
zynq-uboot>
 
zynq-uboot>
For accesing these information on Linux procfs, the device tree must be modified (using u-boot fdt command): for example:
+
</pre>
 +
For accesing these information on Linux procfs, the device tree must be modified (using u-boot fdt command). For example:
 +
<pre>
 
zynq-uboot> print loadfdt configid_fixupfdt
 
zynq-uboot> print loadfdt configid_fixupfdt
 
loadfdt=tftpboot ${fdtaddr} ${fdtfile}
 
loadfdt=tftpboot ${fdtaddr} ${fdtfile}
Line 85: Line 80:
 
FDT: override 'som_uniqueid' with 'fffffefc:fffffefc'
 
FDT: override 'som_uniqueid' with 'fffffefc:fffffefc'
 
FDT: override 'cb_uniqueid' with 'a600000f:24188b2d'
 
FDT: override 'cb_uniqueid' with 'a600000f:24188b2d'
It is possible to read the ConfigID/UniqueID via procfs; for example:
+
</pre>
 +
It is possible to read the ConfigID/UniqueID via procfs. For example:
 +
<pre>
 
root@bora:~# for f in  /proc/device-tree/*id*; do echo -n "$f: "; cat $f; echo; done
 
root@bora:~# for f in  /proc/device-tree/*id*; do echo -n "$f: "; cat $f; echo; done
 
/proc/device-tree/cb_configid: 00000001
 
/proc/device-tree/cb_configid: 00000001
Line 93: Line 90:
 
df646299:0b0579d4
 
df646299:0b0579d4
 
root@axel-lite:~#
 
root@axel-lite:~#
 +
</pre>
 +
<section end=BELK/>

Latest revision as of 15:09, 23 November 2021

Info Box
Bora5-small.jpg Applies to Bora
BORA Xpress.png Applies to BORA Xpress
BORALite-TOP.png Applies to BORA Lite

History[edit | edit source]

Version Date BELK version Notes
1.0.0 November 2015 3.0.0 First release
2.0.0 December 2016 3.0.2 / 1.0.1
4.0.0 / 2.0.0
Changed page name
2.1.0 October 2019 4.1.0 Added BORA Lite


ConfigID management[edit | edit source]

ConfigID is a new feature of DAVE Embedded Systems products. It's main purpose is providing an automatic mechanism for the identification of the product model and configuration.

General information about ConfigID are provided here. The following sections details some Bora/BoraX specific information.

ConfigID hardware implementation on Bora/BoraX/BoraLite[edit | edit source]

BORA uses the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)

ConfigID on BoraLite[edit | edit source]

For BORA Lite module configured for booting from NAND, the ConfigID is stored on internal I2C EPROM: see here for more information.

ConfigID software implementation on Bora/BoraX/BoraLite[edit | edit source]

U-Boot integrates the software routines for reading and displaying the ConfigID. Hereunder an example of SOM ConfigID at startup:

U-Boot 2014.07 (Jul 24 2015 - 14:30:55) [belk-2.2.0]

Board:  BORA
I2C:   ready
DRAM:  ECC disabled 1 GiB
NAND:  1024 MiB
MMC:   zynq_sdhci: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
In:    serial
Out:   serial
Err:   serial
SOM ConfigID#: 00000002
SOM UniqueID#: fffffefc:fffffefc
CB ConfigID#: 00000001
CB UniqueID#: a600000f:24188b2d
Net:   Gem.e000b000
zynq-uboot>

For accesing these information on Linux procfs, the device tree must be modified (using u-boot fdt command). For example:

zynq-uboot> print loadfdt configid_fixupfdt
loadfdt=tftpboot ${fdtaddr} ${fdtfile}
configid_fixupfdt=if configid checkfdt ${fdtaddr} som_configid ${som_configid#}; then if configid checkfdt ${fdtaddr} cb_configid ${cb_configid#}; then configid fdt_uniqueid ${fdtaddr}; fi; fi

zynq-uboot> run loadfdt configid_fixupfdt
Gem.e000b000 Waiting for PHY auto negotiation to complete....... done
Using Gem.e000b000 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.77
Filename 'bora/bora.dtb.as'.
Load address: 0x2000000
Loading: T ##
         1000 Bytes/s
done
Bytes transferred = 10019 (2723 hex)
FDT: property som_configid FDT: override 'som_configid' with '00000002'
FDT: property cb_configid match
FDT: override 'som_uniqueid' with 'fffffefc:fffffefc'
FDT: override 'cb_uniqueid' with 'a600000f:24188b2d'

It is possible to read the ConfigID/UniqueID via procfs. For example:

root@bora:~# for f in  /proc/device-tree/*id*; do echo -n "$f: "; cat $f; echo; done
/proc/device-tree/cb_configid: 00000001
/proc/device-tree/cb_uniqueid: a600000f:24188b2d
/proc/device-tree/som_configid: 00000002
/proc/device-tree/som_uniqueid: fffffefc:fffffefc
df646299:0b0579d4
root@axel-lite:~#