LS1088ARDB/LS1088ARDB-PB - How to update U-Boot binary in QSPI NOR flash

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

LS1088ARDB/LS1088ARDB-PB - How to update U-Boot binary in QSPI NOR flash

No ratings

LS1088ARDB/LS1088ARDB-PB - How to update U-Boot binary in QSPI NOR flash

This how-to topic is applicable only for LSDK 18.09 and older releases. 

For LSDK 18.12 and newer releases, refer LS1088ARDB-PB - How to deploy TF-A binaries in QSPI NOR flash.

Follow these steps to update the U-Boot binary in QSPI NOR flash. 

Prerequisites 

  • Ubuntu 18.04 64-bit should be installed on the Linux host machine for building LSDK 18.06 or LSDK 18.09 U-Boot binary.

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

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

 

Compiling U-Boot binary

Clone the u-boot repository compile the U-Boot binary for QSPI boot.

  1. $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git
  2. $ cd u-boot
  3. $ git checkout -b <new branch name> LSDK-<LSDK version>. For example, $ git checkout -b LSDK-18.09 LSDK-18.09 
  4. $ export ARCH=arm64
  5. $ export CROSS_COMPILE=aarch64-linux-gnu-
  6. $ make distclean
  7. Run either of following depending on the board you are using: 
    • For LS1088ARDB: $ make ls1088ardb_qspi_defconfig
    • For LS1088ARDB-PB: make ls1088ardb_pb_qspi_defconfig
  8. If required, make changes to the U-Boot files.
  9. $ make

If the make command shows the error "*** Your GCC is older than 6.0 and is not supported", ensure that you are using Ubuntu 18.04 64-bit version for building LSDK 18.06 or LSDK 18.09 U-Boot binary. 

The compiled U-Boot image, u-boot.bin, is available at u-boot/.

Flashing U-Boot binary to QSPI NOR flash

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

For example:

For LS1088ARDB, in boot log, you’ll see:

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

For LS1088ARDB-PB, in boot log, you'll see:

Board: LS1088ARDB-PB, Board Arch: V1, Board version: A, boot from QSPI:0

U-Boot image can be loaded to LS1088ARDB/LS1088ARDB-PB from a TFTP server or from a mass storage device (SD, USB, or SATA).

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@qsgmii, DPMAC4@qsgmii, DPMAC5@qsgmii, DPMAC6@qsgmii, DPMAC7@qsgmii, DPMAC8@qsgmii, DPMAC9@qsgmii, DPMAC10@qsgmii

  1. Set server IP to the IP 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 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

  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 DPMAC3@qsgmii device

host 192.168.1.1 is alive

Load U-Boot image from the TFTP server

  1. Program QSPI NOR flash1: => sf probe 0:1
  2. Flash U-Boot image:

    1. => tftp 0xa0000000 u-boot.bin
    2. => print filesize

      filesize=aa4b4

  3. Program U-Boot image to QSPI NOR flash: => sf erase 0x100000 +$filesize && sf write 0xa0000000 0x100000 $filesize. 

    Address 0x100000 is the location of U-Boot in QSPI NOR flash. For the complete flash memory layout for the PPA boot flow, refer Flash layout for old boot flow with PPA.

  4. Boot from QSPI NOR flash1: => qixis_reset altbank

    For LS1088ARDB, in boot log, you’ll see:

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

    For LS1088ARDB-PB, in boot log, you'll see:

    Board: LS1088ARDB-PB, Board Arch: V1, Board version: A, 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 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 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 QSPI NOR flash1=> sf probe 0:1
  4. Load U-Boot image from the storage device

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

    => print filesize

    For example:

    => load mmc 0:2 a0000000 u-boot.bin

    => print filesize

    filesize=aaa34

    Or

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

    => print filesize

    Or

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

    => print filesize

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

     Address 0x100000 is the location of U-Boot in QSPI NOR flash. For the complete flash memory layout for the PPA boot flow, refer Flash layout for old boot flow with PPA.
  6.  Boot from QSPI NOR flash1: => qixis_reset altbank

    For LS1088ARDB, in boot log, you’ll see:

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

    For LS1088ARDB-PB, in boot log, you'll see:

    Board: LS1088ARDB-PB, Board Arch: V1, Board version: A, 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 QSPI NOR flash.

Labels (1)
Version history
Last update:
‎09-10-2020 03:07 AM
Updated by: