LS2088ARDB - How to update MC firmware, DPC, and DPL images in QSPI NOR flash

Document created by Swati Gupta Employee on Nov 29, 2019Last modified by Swati Gupta Employee on Jan 23, 2020
Version 9Show Document
  • View in full screen mode

Follow these steps to update the DPAA2 MC firmware, DPC, and DPL images in QSPI NOR flash.

In LS2088ARDB, Boot option switching between parallel NOR boot and QSPI NOR boot cannot be performed using commands. Boot option switching can be done by adjusting DIP switch settings and jumper settings on the Reference Design Board. For details, see Layerscape Software Development Kit User Guide.

Obtaining MC firmware

Clone the qoriq-mc-binary repository.

  1. git clone https://github.com/NXP/qoriq-mc-binary.git
  2. $ cd qoriq-mc-binary/ls2088a/
  3. $ git checkout -b <new branch name> <LSDK tag>. For example, $ git checkout -b LSDK-19.09 LSDK-19.09

The prebuilt MC firmware image, mc_10.18.0_ls2088a.itb, is available at /qoriq-mc-binary/ls2088a/.

Note that the name of the MC firmware image may vary depending on the release version used. 

Obtaining DPC and DPL images

Clone the mc-utils repository and compile the DPC and DPL images.

  1. $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils
  2. $ cd mc-utils
  3. git checkout -b <new branch name> <LSDK tag>. For example, $ git checkout -b LSDK-19.09 LSDK-19.09
  4. If required, make changes to the DPC and DPL files.
  5. $ make -C config/

The compiled dpc.0x2A_0x41.dtb and  dpl-eth.0x2A_0x41.dtb images are available at /mc-utils/config/ls2088a/RDB/.

Note that the name of the DPC and DPL images may vary depending on the release version used. 

 

Flashing MC firmware, DPC, and DPL images to QSPI NOR flash

  1. Boot LS2088ARDB from QSPI. Ensure that the switches and jumpers are set to boot the board from QSPI. For booting from QSPI:
    SW5[1:8] = 1111 1111
    SW3[1:8] = 0011 0001
    SW4[1:8] = 0011 1111
    SW6[1:8] = 1111 1111
    SW7[1:8] = 0100 1010
    SW9[1:8] = 0100 0100
    SW8[1:8] = 0111 1111
  2. In addition to the above switch settings, make sure the following jumper settings are correct (for RDB Rev E and later). 
    • J8 = 1-2 for QSPI boot, via onboard QSPI flash
    • J8 = 2-3 for QSPI boot, via QSPI emulator
    • J14 = 2-3, for QSPI boot
  3. For LS2088ARDB, in boot log, you'll see:

    Board: LS2088AE Rev1.1-RDB, Board Arch: V0, Board version: A, boot from vBank: 0

 

Option 1: Load image from the TFTP server

 

Set up Ethernet connection

 

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

DPMAC1@xgmii, DPMAC2@xgmii, DPMAC3@xgmii, DPMAC4@xgmii, DPMAC5@xgmii, DPMAC6@xgmii, DPMAC7@xgmii, DPMAC8@xgmii

      
  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.   
  3. Set ethact and ethprime as the Ethernet interface connected to the TFTP server.

    See LS2088ARDB Ethernet port mappingfor 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 DPMAC1@xgmii

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

    For example:

    => setenv ethact DPMAC1@xgmii

  4. 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

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

=> ping $serverip

Using DPMAC1@xgmii device

host 192.168.1.1 is alive

Load images from a TFTP server

  1. Flash MC firmware to QSPI NOR flash:
    1. => sf probe 0:0
    2. => tftp 0xa0000000 mc_10.18.0_ls2088a.itb
    3. => print filesize
    4. => sf erase 0x00A00000 +$filesize && sf write 0xa0000000 0x00A00000 $filesize

      Address 0x00A00000 is the location of MC firmware in QSPI NOR flash. Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.

  2. Flash DPL image to QSPI NOR flash:
    1. => sf probe 0:0
    2. => tftp 0xa0000000 dpl-eth.0x2A_0x41.dtb
    3. => print filesize 
    4. => sf erase 0x00D00000 +$filesize && sf write 0xa0000000 0x00D00000 $filesize

      Address 0x00D00000 is the location of DPL image in alternate NOR bank. Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.

  3. Flash DPC image to QSPI NOR flash:
    1. => sf probe 0:0
    2. => tftp 0xa0000000 dpc.0x2A_0x41.dtb
    3. => print filesize 
    4. => sf erase 0x00E00000 +$filesize && sf write 0xa0000000 0x00E00000 $filesize

      Address 0x00E00000 is the location of DPC image in alternate NOR bank. Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.

  4. Reset from QSPI NOR flash: => reset

Ensure that SD card, USB flash drive, or SCSI hard disk installed with LSDK Ubuntu distribution is plugged into the board to boot the board to Ubuntu. If U-Boot does not find LSDK on a mass storage device, it will boot TinyDistro from lsdk_linux_arm64_tiny.itb stored in QSPI NOR flash.

 

Option 2: Load images from partition on mass storage device (SD, USB, or SATA)

  1. Select mass storage device to use.
    => mmc rescan
    => mmc info

    Or

    => usb start
    => usb info

    Or

    => scsi scan

    => scsi info

  2. Optional – List files on the storage device

    => ls mmc <device:partition>

    For example:

    => ls mmc 0:2

    Or

    => ls usb <device:partition>

    For example:

    => ls usb 0:1

    Or

    => ls scsi <device:partition>

    For example:

    => ls scsi 0:2

    If the ls command fails to run, check that U-Boot in QSPI NOR flash supports the command by typing ls at the U-Boot prompt:

    => ls
    ls - Lists files in a directory (default)

     

    Usage:
    ls <interface> [<dev[:part]> [directory]]
    - Lists files in directory [directory] of partition [part] on device type [interface] and instance [dev].

     

    If U-Boot does not support this command, then update the composite firmware image in QSPI NOR flash.

     

    For steps to update composite firmware image in QSPI NOR flash, see Layerscape Software Development Kit User Guide .

    Use the following command if the SD card is formatted/created using LSDK flex-installer command:

    => load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
    For example:

    =>load mmc 0:2 $load_addrmc_10.18.0_ls2088a.itb
    Use the following command if the SD card is formatted/created on a Windows PC:

    => fatload <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
    For example:

    =>fatload mmc 0:2 $load_addrmc_10.18.0_ls2088a.itb
    Use the following command if the SD card is formatted/created on a Linux PC:

    => ext2load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
    For example:

    =>ext2load mmc 0:2 $load_addrmc_10.18.0_ls2088a.itb
    Also note that LSDK flex-installer command puts the images on the IInd partition, so 0:2 is used in the load command. If the SD card is formatted on Windows PC or Linux PC for single partition only, then 0 should be used instead of 0:2 in the fatload/ext2load command.

  3. Flash MC firmware:
    1. Program QSPI NOR flash: => sf probe 0:0
    2. Load MC firmware image from the storage device

      => load mmc 0:2 80000000 <mc firmware>

      For example:

      => load mmc 0:2 80000000 mc_10.18.0_ls2088a.itb

      => print filesize

      Or

      => load usb 0:2 80000000 <image name>

      => print filesize

      Or

      => load scsi 0:2 80000000 <image name>

      => print filesize

    3. Program MC firmware image to QSPI NOR flash: => sf erase 0x00A00000 +$filesize && sf write 0x80000000 0x00A00000 $filesize

      Address 0x00A00000 is the location of MC firmware in QSPI NOR flash.  Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.

    1. Program QSPI NOR flash: => sf probe 0:0
    2. Load DPL image from the storage device

      => load mmc 0:2 80000000 <dpl image>

      For example:

      => load mmc 0:2 80000000 dpl-eth.0x2A_0x41.dtb

      => print filesize

      Or

      => load usb 0:2 80000000 <image name>

      => print filesize

      Or

      => load scsi 0:2 80000000 <image name>

      => print filesize

    3. Program DPL image to QSPI NOR flash: => sf erase 0x00D00000 +$filesize && sf write 0x80000000 0x00D00000 $filesize

      Address 0x00D00000 is the location of DPL image in QSPI NOR flash.  Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.

      Flash DPL image:

  4. Flash DPC image:

    1. Program QSPI NOR flash: => sf probe 0:0
    2. Load DPC image from the storage device

      => load mmc 0:2 80000000 <dpc image>

      For example:

      => load mmc 0:2 80000000 dpc.0x2A_0x41.dtb

      => print filesize

      Or

      => load usb 0:2 80000000 <image name>

      => print filesize

      Or

      => load scsi 0:2 80000000 <image name>

      => print filesize

    3. Program DPC image to QSPI NOR flash: => sf erase 0x00E00000 +$filesize && sf write 0x80000000 0x00E00000 $filesize

      Address 0x00E00000 is the location of DPC image in QSPI NOR flash.  Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.

  5. Reset and boot from QSPI NOR flash: => reset

    Ensure that SD card, USB flash drive, or SCSI hard disk installed with LSDK Ubuntu distribution is plugged into the board to boot the board to Ubuntu. If U-Boot does not find LSDK on a mass storage device, it will boot TinyDistro from lsdk_linux_arm64_tiny.itb stored in QSPI NOR flash.

Attachments

    Outcomes