This how-to topic is applicable for only LSDK 18.09 and older releases.
Follow these steps to update the U-Boot binary 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.
Clone the u-boot repository.
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 in the directory u-boot/.
U-Boot 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 the 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.
See 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
Program QSPI NOR flash1: => sf probe 0:1
filesize=ae84a
Address 0x100000 is the location of U-Boot in QSPI NOR flash. Refer Flash layout for boot flow with PPA – LSDK 18.09 and older releases 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:3
System Volume Information/
714826 u-boot.bin
1 file(s), 1 dir(s)
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 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.
For steps to update composite firmware image in QSPI NOR flash, see LS1046ARDB - How to update composite firmware image in QSPI NOR flash.
=> load mmc <device:partition> a0000000 <image name>
=> print filesize
For example:
=> load mmc 0:3 a0000000 u-boot.bin
714826 bytes read in 52 ms (13.1 MiB/s)
=> print filesize
filesize=ae84a
Or
=> load usb <device:partition> a0000000 <image name>
=> print filesize
Or
=> load scsi <device:partition> a0000000 <image name>
=> print filesize
Address 0x100000 is the location of U-Boot in QSPI NOR flash. Refer Flash layout for boot flow with PPA – LSDK 18.09 and older releases 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.Hi,
I faced a serious problem about QSPI booting problem after update.
According to the guide, I did make QSPI flash#1 updated.
And I tried to update QSPI flash#0 to keep the same version as the flash #1. I erased & wrote it.
After that, my board can't boot from flash#0. It can only boot from flash#1 and SD card.
I copied the contents of flash#1 to memory and I wrote to flash#0.
I checked the content of flash#0 is the same as flash#1.
When I boot from flash#1 and then command "cpld reset" then it can boot from flash#0. That means the content of flash#0 is right to boot I guess.
Would you help me with that?
Thanks
Hi,
From the problem description, it seems that after booting from QSPI NOR flash1, if you enter the command “cpld reset” the board successfully boots from QSPI NOR flash0. However, if you power on the board or reset the board, the board will not boot from QSPI NOR flash0.
One item to check is that the switch settings are correct when trying to boot from QSPI NOR flash0. The QorIQ LS1046A Reference Design Board Getting Started Guide has a table that lists the switch settings to use for the different boot sources (QSPI NOR flash0, QSPI NOR flash1, and SD card). This table can be found in section 12 titled “LS1046ARDB boot sources.” This section also has a table that lists the CPLD commands that can be used to override the switch settings.
Hope this resolves the issue.
Thanks.
JS Park,
I have the same problem, I erased and wrote QSPI vBank0 and now LS1046A-RDB won't boot from vBank0.
vBank4 and SD start with no problem using the switch positions detailed in the QorIQ LS1046A Reference Design Board Getting Started Guide.
vBank0 and vBank4 are identical copies, did you find a solution to boot vBank0?
Hi,
Penman
I don't have found any solutions by using switches, commands & codes.
I made the NOR flash normal after erasing it by Code Worrier.
And then, the flash is working properly. I just guess that the first sector of NOR flash was locked and Code Worrier was able to resolve the situation.
I hope it would be helpful to you.
Hi, I flashed QSPI NOR flash 1 with a newly built U-Boot binary by following the documented steps and then I flahed QSPI NOR flash 0 with the same U-Boot binary. However, I am able to boot the board from both flash 0 and flash 1. The issue is not reproducing for me.
Thanks.
Hi Swati, thank you for looking into this however my experience was similar to JS Park; despite following the steps above directed to NOR flash 0, I also noticed that the first 0x8000 bytes would silently fail to erase/write. It may not be a coincidence that this is also the first 8 4kB 'hybrid' sectors of S25F512S though I don't have drivers to lock/unlock the QSPI configuration register default settings. I was lucky to have access to a CodeWarrior and TAP/cable and recover this.