The qoriq_memory_layout.txt file I found in the LSDK flexbuild/docs/ directory shows the 64Mbyte layout “on all QorIQ platforms”. However, the FRDM-LS1012AGSG.pdf document (LS1012A Freedom board Getting Started Guide) shows a much different layout (and also seems to have incorrect start and end addresses?).
Working with my LS1012A-Freedom board, I have successfully written
So I feel confident those are correct. They match the entries in the flexbuild doc (but only the first two match what is in the Getting Started Guide).
Based on the Getting Started Guide, I initially wrote my kernel/dtb/initramd ITB file to 0x00500000. After writing my kernel/dtb/initramd ITB to the proper offset, it appeared that the write to 0x00500000 had “broken” the PFE firmware:
PFE Firmware: Bad firmware image (not a FIT image)
I was a bit frustrated at that point and chose to just program a complete firmware image from flexbuild into the QSPI flash to recover the board. So I have not confirmed the 0x00400000 offset in the flexbuild doc as being correct for the PPA firmware.
In addition to the proper offsets, I would also like to confirm that the PFE Firmware error I saw would be fixed by writing the proper PPA firmware image to the proper address. The Getting Started Guide flash layout says that the PFE binary is in the same 1Mbyte block as the U-Boot boot loader binary. But the flexbuild text file does not call out the PFE binary as a separate entity.
When I build using the Yocto-based distribution (based on YP 2.5), there is a file created in the tmp/deploy/images/{board}/ directory: ppa-{board}-{timestamp}.itb.
Is this the correct file to write to the PPA firmware address in the QSPI flash?
I have learned that the RCW/PBI file needs to be byte-swapped before being written into the QSPI flash. Is there a reason why this step has not been included in the Yocto recipe that builds it?
Do any of the other components also need to be byte-swapped? I do not think the U-Boot binary or environment need it, as I have successfully written them. I have also successfully written a kernel image without swapping. However, since I have not been successful with the PPA, I would like to confirm the requirement for it.
Finally, is there any way to modify the placement of the U-Boot binary, U-Boot environment, and PPA FIT image in the QSPI? If we will never need the currently allocated amount of space for each item, I could shift everything down and have more memory for a small kernel/dtb/rootfs image, or use a smaller QSPI flash part.
I have looked through the PBL configuration documents I have found, but I do not see anything that indicates it is possible. The PBI data used to create the PBL image does have a file uboot_address.rcw with commands to write some values:
write 0x570604, 0x40100000
write 0x57015c, 0x50100000
write 0x570600, 0x00000000
Based on the file name, I thought it might be what I was looking for, but the values do not make sense with either layout I have seen. Nor do the addresses to which the values are witten make much sense- according to the LS1012A reference manual (assuming these addresses are in the SCFG memory map), address 0x604 and 0x600 are in the scratch read/write registers, and 0x15c is the register for the QSPI clock source/enable/disable. Perhaps the PBL code uses these locations differently, but I have not found anything that helps me understand that. And I have found nothing about the PPA firmware location.
I appreciate any and all help with these questions.
Please refer to the LSDK documentation:
Definition | Max Size | NOR/QSPI/NAND Flash Offset | SD Card Start Block No. | |
RCW+PBI | 1MB | 0x00000000 | 0x00008 | |
Boot firmware (U-Boot or UEFI) | 2MB | 0x00100000 | 0x00800 | |
Boot firmware Environment | 1MB | 0x00300000 | 0x01800 | |
PPA firmware | 2MB | 0x00400000 | 0x02000 | |
Secure boot headers | 3MB | 0x00600000 | 0x03000 | |
DPAA1 FMAN ucode | 256KB | 0x00900000 | 0x04800 | |
QE/uQE firmware | 256KB | 0x00940000 | 0x04A00 | |
Ethernet PHY firmware | 256KB | 0x00980000 | 0x04C00 | |
Reserved | 256KB | 0x009C0000 | 0x04E00 | |
DPAA2 MC or PFE firmware | 3MB | 0x00A00000 | 0x05000 | |
DPAA2 DPL | 1MB | 0x00D00000 | 0x06800 | |
DPAA2 DPC | 1MB | 0x00E00000 | 0x07000 | |
Device tree (needed by UEFI) | 1MB | 0x00F00000 | 0x07800 | |
Kernel | lsdk_linux_<arch>.itb | 16MB | 0x01000000 | 0x08000 |
Ramdisk RFS | 32MB | 0x02000000 | 0x10000 |
ufedor -
Thank you for the response. Does this mean that the information in the LS1012A Freedom board Getting Started Guide is incorrect? Is there other information in that guide that I should question?
.Tim
The information in the LS1012A GSG is correct for the previous version of the Linux SDK.
Please refer to the LSDK documentation.