LS1088ARDB - How to update PBL/RCW binary in QSPI NOR flash

Document created by Swati Gupta Employee on Oct 26, 2018Last modified by Swati Gupta Employee on Nov 29, 2018
Version 22Show Document
  • View in full screen mode

Follow these steps to update the PBL/RCW binary in the QSPI NOR flash. 

qixis_reset boots the board from QSPI flash0 and qixis_reset altbank boots the board from QSPI flash1.

sf probe 0:1 means that the alternate bank will be written to. So, if the board boots from QSPI flash0 and sf probe 0:1 is entered at the U-Boot prompt, the commands that follow will program QSPI flash1.

 

Compiling PBL binary from RCW source file (optional)

If user already has a PBL binary this step can be skipped.  

Clone the rcw repository and compile the PBL binary. 

  1. $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
  2. $ cd rcw
  3. $ git checkout -b <new branch name> <LSDK tag>. For example, $ git checkout -b LSDK-18.09 LSDK-18.09 
  4. $ cd ls1088ardb
  5. If required, make changes to the rcw files.
  6. $ make

The default PBL binary for LS1088ARDB is FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_qspi.bin 

See the rcw/ls1088ardb/README file for an explanation of the naming convention for the directories that contain the RCW source and binary files.

Flashing PBL binary to QSPI NOR flash

  1. Boot LS1088ARDB from the QSPI. Ensure that the switches are set to boot the board from the QSPI. For booting from the QSPI, SW1[1:8] + SW2[1] = 0011_0001_X
  2. Boot from flash0: => qixis_reset

In boot log, you’ll see:

Board: LS1088A-RDB, Board Arch: V1, Board version: B, boot from QSPI:0

 

PBL binary can be loaded to the LS1088ARDB from a TFTP server or from a mass storage device (SD, USB, or SATA).

 

Option 1: Load image from a TFTP server

 

Set up Ethernet connection

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

DPMAC1@xgmii [PRIME], DPMAC2@xgmii, DPMAC3@qsgmii, DPMAC4@qsgmii, DPMAC5@qsgmii, DPMAC6@qsgmii, DPMAC7@qsgmii, DPMAC8@qsgmii, DPMAC9@qsgmii, DPMAC10@qsgmii

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

  3. Set ethact and ethprime as the ethernet interface connected to the TFTP server.

    See LS1088ARDB/LS1088RDB-PB 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@qsgmii

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

    For example:

    => setenv ethact DPMAC3@qsgmii

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

=> ping $serverip

Using DPMAC3@qsgmii device

host 192.168.1.1 is alive

 

Load PBL binary from the TFTP server

  1. Program alternate bank: => sf probe 0:1
  2. TFTP PBL binary from the server to the DDR and write image to the QSPI NOR flash1:
    1. => tftp 0xa0000000 <pbl binary>
    2. => print filesize

      filesize=b4

    3. => sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize 

      Address 0x0 is the location of PBL in the QSPI NOR flash.  Refer thLayerscape Software Development Kit <version> Documentation for the complete flash memory layout.

  3. Boot from flash1: => qixis_reset altbank

    In boot log, you’ll see:

    Board: LS1088A-RDB, Board Arch: V1, Board version: C, boot from QSPI:1

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 the QSPI NOR flash.

 

Option 2: Load image 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

  3. Program alternate bank: => sf probe 0:1
  4. Load PBL image from the storage device.

    => load mmc 0:2 a0000000 <image name>

    => print filesize

    For example:

    => load mmc 0:2 a0000000 rcw_1600_qspi.bin

    => print filesize

    filesize=b4

    Or

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

    => print filesize

    Or

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

    => print filesize

  5. Program image to the QSPI NOR flash: => sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize

    Address 0x0 is the location of PBL binary in the QSPI NOR flash.  Refer thLayerscape Software Development Kit <version> Documentation for the complete flash memory layout.

  6. Boot from flash1: => qixis_reset altbank

    In boot log, you’ll see:

    Board: LS1088A-RDB, Board Arch: V1, Board version: C, boot from QSPI:1

    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 the QSPI NOR flash.

Attachments

    Outcomes