Follow these steps to update the DPAA2 MC firmware, DPC, and DPL images for the LX2160ARDB on the SD/eMMC card.
Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions.
Clone the qoriq-mc-binary repository.
$ git clone https://github.com/NXP/qoriq-mc-binary.git
The prebuilt MC firmware image, mc_10.20.4_lx2160a.itb, is available at qoriq-mc-binary/lx2160a/.
Note: The exact name of the MC firmware image may vary depending on the LSDK release version used.
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils
The compiled dpc-usxgmii.dtb and dpl-eth.19.dtb images are available at /mc-utils/config/lx2160a/RDB/.
Note: The exact name of the DPL and DPC images may vary depending on the LSDK release version used.
Image | SD/eMMC card start block number |
---|---|
DPAA2 MC firmware | 0x05000 = 20480 |
DPAA2 DPL | 0x06800 = 26624 |
DPAA2 DPC | 0x07000 = 28672 |
Refer the LSDK firmware and SD card start block number for complete listing of the SD card start block numbers for all LSDK firmware images.
Boot LX2160ARDB from FlexSPI. Ensure that the switches are set to boot the board from FlexSPI.
Boot from FlexSPI NOR flash0: => qixis_reset
For example:
For LX2160ARDB, in U-Boot log, you’ll see:
Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#0
When board boots up, U-Boot prints a list of enabled Ethernet interfaces.
DPMAC2@xlaui4, DPMAC3@xgmii, DPMAC4@xgmii, DPMAC5@25g-aui, DPMAC6@25g-aui, DPMAC17@rgmii-id, DPMAC18@rgmii-id
=> setenv serverip <ipaddress1>
Set ethact and ethprime as the ethernet interface connected to the TFTP server.
NOTE: See LX2160ARDB Ethernet Port Mapping for the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux.
=> setenv ethprime <name of interface connected to TFTP server>
For example:
=> setenv ethprime DPMAC3@xgmii
=> setenv ethact <name of interface connected to TFTP server>
For example:
=> setenv ethact DPMAC3@xgmii
Static IP address assignment:
=> setenv ipaddr <ipaddress2>
=> setenv netmask <subnet mask>
Dynamic IP address assignment:
=> dhcp
=> saveenv
=> ping $serverip
Using DPMAC3@xgmii device
host 192.168.2.1 is alive
=> tftp 82000000 mc_10.20.4_lx2160a.itb
Flash MC firmware to SD card:
=> mmc dev 0; mmc write 8200000 5000 <blk_cnt>
Flash MC firmware to eMMC card:
=> mmc dev 1; mmc write 8200000 5000 <blk_cnt>
Here, blk_cnt refers to number of blocks in SD/eMMC card that need to be written as per the file size.
For example, when you load mc_10.20.4_lx2160a.itb from the TFTP server, if the bytes transferred is 1092272 (10aab0 hex), then blk_cnt is calculated as "1092272 /512 = 2133 (855 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 10 (A hex) sectors, for this example, mmc write command will be:
=> mmc write 82000000 5000 85F
=> tftp 82000000 dpl-eth.19.dtb
=> mmc dev 0; mmc write 8200000 6800 <blk_cnt>
=> mmc dev 1; mmc write 8200000 6800 <blk_cnt>
Here, blk_cnt refers to number of blocks in SD/eMMC card that need to be written as per the file size.
For example, when you load dpl-eth.19.dtb from the TFTP server, if the bytes transferred is 4583 (11e7 hex), then blk_cnt is calculated as "4583/512 = 8 (8 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 18 (12 hex) sectors, for this example, mmc write command will be:
=> mmc write 82000000 6800 12
=> tftp 82000000 dpc-usxgmii.dtb
Flash DPC image to SD card:
=> mmc dev 0; mmc write 8200000 7000 <blk_cnt>
Flash DPC image to eMMC card:
=> mmc dev 1; mmc write 8200000 7000 <blk_cnt>
Here, blk_cnt refers to number of blocks in SD card that need to be written as per the file size.
For example, when you load dpc-usxgmii.dtb from the TFTP server, if the bytes transferred is 736 (2e0 hex), then blk_cnt is calculated as "736/512 = 1 (1 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 11 (B hex) sectors, for this example, mmc write command will be:
=> mmc write 82000000 7000 B
LX2160ARDB will boot with updated MC firmware and DPC and DPL images. In the U-Boot log, you will see:
Model: NXP Layerscape LX2160ARDB Board
Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from SD
...
...
fsl-mc: Booting Management Complex ... SUCCESS
fsl-mc: Management Complex booted (version: 10.20.4, boot status: 0x1)
Hit any key to stop autoboot: 0
=>
OR
Model: NXP Layerscape LX2160ARDB Board
Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from eMMC
...
...
fsl-mc: Booting Management Complex ... SUCCESS
fsl-mc: Management Complex booted (version: 10.20.4, boot status: 0x1)
Hit any key to stop autoboot: 0
=>