LS1043ARDB - How to update DPAA1 FMan microcode (ucode) image on SD card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1043ARDB - How to update DPAA1 FMan microcode (ucode) image on SD card

LS1043ARDB - How to update DPAA1 FMan microcode (ucode) image on SD card

Follow these steps to update the DPAA1 FMan ucode image on the SD card. 

Obtaining DPAA1 FMan ucode image

Clone the qoriq-fm-ucode repository.

  1. git clone https://github.com/NXP/qoriq-fm-ucode.git
  2. $ cd qoriq-fm-ucode
  3. $ git checkout LSDK-<LSDK version>For example, $ git checkout LSDK-19.06

The prebuilt FMan ucode images, fsl_fman_ucode_ls1043_r1.1_<microcode version>.bin, are at qoriq-fm-ucode/. In the binary file, ls1043_r1.1 refers to the LS1043A silicon revision 1.1. See qoriq-fm-ucode/readme for a description of the ucode version numbers.

SD card start block number for DPAA1 FMan ucode image

Image  SD card start block number

DPAA1 FMan ucode image

0x04800 = 18432

Refer Flash layout for new boot flow with TF-A for complete listing of the SD card start block numbers for all LSDK firmware images.

Programming DPAA1 FMan ucode image to SD card

Option 1: Load image on SD card plugged into Linux host via dd command

  1. Plug the SD card into the Linux host.
  2. Run the following command on the Linux host:
    • $ sudo dd if=fsl_fman_ucode_ls1043_r1.1_<ucode version>.bin of=/dev/sdX bs=512 seek=18432 conv=fsync

      Use the command cat /proc/partitions to see a list of devices and their sizes to make sure that the correct device names have been chosen.

      The SDHC storage drive in the Linux PC is detected as /dev/sdX, where X is a letter such as a, b, c. Make sure to choose the correct device name, because data on this device will be replaced.

      If your Linux host machine supports read/write SDHC card directly without an extra SDHC card reader device, the device name of SDHC card is typically mmcblk0.

                                                       
  3. Remove the SD card from the Linux host machine.
  4. Plug the SD card into LS1043ARDB and boot the board to Ubuntu using the SD card. You can boot the board using the SD card either by:
    • setting the switches: SW3[1:8] = 10110011, SW4 [1:8] =00100000SW5 [1:8] = 00100010, or
    • boot switching to SD card => cpld reset sd

In boot log, you’ll see:

Board: LS1043ARDB, boot from SD

You can check the following code line in the boot log to confirm that the DPAA1 FMan ucode image on the SD card is updated.

Fman1: Uploading microcode version 106.4.18

If U-Boot does not find LSDK on the SD card, it will boot TinyDistro from lsdk_linux_arm64_tiny.itb stored on the SD card.

Option 2: Load image on SD card plugged into board from the TFTP server

  1. Boot LS1043ARDB from NOR flash. Ensure that the switches are set to boot the board from NOR bank 0. For booting from NOR bank 0, switch settings are as follows:
    • SW3[1:8] = 10110011
    • SW4[1:8] = 00010010
    • SW5[1:8] = 10100010
  2. Boot from NOR bank 0: => cpld reset

    For LS1043ARDB, in boot log, you'll see:

    Board: LS1043ARDB, boot from vBank 0

Set up Ethernet connection

When board boots up, U-Boot prints a list of enabled Ethernet interfaces.

FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5

  1. Set server IP address to the IP address of the host machine on which you have configured the TFTP server. 

    => setenv serverip <ipaddress1>

  2. Set ethact and ethprime as the Ethernet interface connected to the TFTP server.

    See LS1043ARDB Ethernet and FMC 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 FM1@DTSEC4

    => setenv ethact <name of interface connected to TFTP server>

    For example:

    => setenv ethact FM1@DTSEC4

  3. Set IP address of the board. You can set a static IP address or, if the board can connect to a dhcp server, you can use the dhcp command. 

    Static IP address assignment:
    => setenv ipaddr <ipaddress2>
    => setenv netmask <subnet mask>

    Dynamic IP address assignment:
    => dhcp

  4. Save the settings. => saveenv
  5. Check the connection between the board and the TFTP server.

=> ping $serverip

Using FM1@DTSEC4 device

host 192.168.1.1 is alive

Load FMan ucode image from the TFTP server

  1. Flash the FMan ucode image=> tftp 0xa0000000 fsl_fman_ucode_ls1043_r1.1_<ucode version>.bin
  2. Program the FMan ucode image to SD card: => mmc write 0xa0000000 0x04800 <blk_cnt>

    Address  0x04800 is the SD card block number for the FMan ucode image.  ReferFlash layout for new boot flow with TF-A for the complete flash memory layout.

    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 FMan ucode from the TFTP server, if the bytes transferred is 37560 (92b8 hex), then blk_cnt is calculated as "37560/512 = 73 (49 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 5 (5 hex) sectors, for this example, mmc write command will be: => mmc write 0xa0000000 0x04800 4E

  3. You can boot the board using the SD card either by:
    • setting the switches: SW3[1:8] = 10110011, SW4 [1:8] =00100000 SW5 [1:8] = 00100010, or
    • boot switching to SD card => cpld reset sd

In boot log, you’ll see:

Board: LS1043ARDB, boot from SD

You can check the following code line in the boot log to confirm that the DPAA1 FMan ucode image on the SD card is updated.

Fman1: Uploading microcode version 106.4.18

If U-Boot does not find LSDK on the SD card, it will boot TinyDistro from lsdk_linux_arm64_tiny.itb stored on the SD card.

Labels (1)
Comments

I think it will be good to have also a section where you show how we write the sd card from u-boot in case we do not have a card reader on the host

No ratings
Version history
Last update:
‎09-10-2020 02:38 AM
Updated by: