Follow these steps to update the composite firmware image in QSPI NOR flash.
cpld reset boots the board from QSPI NOR flash0 and cpld 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.
LSDK includes pre-built firmware images for QSPI NOR flash. The LSDK composite firmware includes RCW+PBI, U-Boot/UEFI, PPA, boot loader environment variables, DPAA1 FMan ucode, QE/uQE firmware, Ethernet PHY firmware, device tree, and lsdk_linux_<arch>.itb images.
Refer Flash layout for new boot flow with TF-A for the complete flash memory layout of the images.
On a Linux host machine, download composite firmware image for QSPI boot from nxp.com.
$ wget http://www.nxp.com/lgfiles/sdk/lsdk<LSDK version>/firmware_<RDB_name>_uboot_qspiboot.img
For example:
$ wget http://www.nxp.com/lgfiles/sdk/lsdk1812/firmware_ls1046ardb_uboot_qspiboot.img
Flashing composite firmware images to QSPI NOR flash
Composite firmware image can be loaded to LS1046ARDB from a TFTP server or from a mass storage device (SD, USB, or SATA).
In boot log, you’ll see:
Board: LS1046ARDB, boot from QSPI vBank 0
When board boots up, U-Boot prints a list of enabled Ethernet interfaces.
FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1, FM1@TGEC2
=> setenv serverip <ipaddress1>
Set ethact and ethprime as the Ethernet interface connected to the TFTP server.
Refer LS1046ARDB 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 FM1@DTSEC4
=> setenv ethact <name of interface connected to TFTP server>
For example:
=> setenv ethact FM1@DTSEC4
Static IP address assignment:
=> setenv ipaddr <ipaddress2>
=> setenv netmask <subnet mask>
Dynamic IP address assignment:
=> dhcp
=> saveenv
=> ping $serverip
Using FM1@DTSEC4 device
host 192.168.1.1 is alive
Flash composite firmware image:
filesize=2351db0
Address 0x0 is the location of the composite firmware image in QSPI NOR flash. Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.
In boot log, you’ll see:
Board: LS1046ARDB, boot from QSPI vBank 4
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.
In boot log, you’ll see:
Board: LS1046ARDB, boot from QSPI vBank 0
=> mmc rescan
=> mmc info
Or
=> usb start => usb info
Or
=> scsi scan
=> scsi info
=> 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
=> load mmc 0:2 a0000000 <image name>
=> print filesize
For example:
=> load mmc 0:2 a0000000 firmware_ls1046ardb_uboot_qspiboot.img
=> print filesize
filesize=2351db0
Or
=> load usb 0:2 a0000000 <image name>
=> print filesize
Or
=> load scsi 0:2 a0000000 <image name>
=> print filesize
If the ls command fails to run, check that U-Boot in QSPI NOR flash0 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 flash0.
Program image to QSPI NOR flash: => sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize
Address 0x0 is the location of the composite firmware image in QSPI NOR flash. Refer Flash layout for new boot flow with TF-A for the complete flash memory layout.
In boot log, you’ll see:
Board: LS1046ARDB, boot from QSPI vBank 4
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.