I successfully created a boot.mcs and boot.bin out of FSBL, bitstream and u-boot.elf. I can flash the mcs file to QSPI - works fine so far.
Board doesn't boot anymore after saving a changed environment (saveenv). Probably it is saved into an area, where boot.mcs is copied to.
So I tried to find out, where are to 3 files are located in flash. But I couldn't find the patterns in mcs file. How to find out (or to set) the addresses of this 3 parts of boot.mcs?
Once I know that, I suppose I have to change the
defines for
CONFIG_ENV_SECT_SIZE
CONFIG_ENV_SIZE
CONFIG_ENV_OFFSET
Is this correct? What are good values for this?
Shouldn't be adapted in devicetree the partitions of the qspi flash according the 4 parts (FSBL, bitstream, uboot, environment)?
---- Edit:
I think I know the answer. Files are appended without space, but with "offset"-param it can be separated (example:
the_ROM_image:
{
t[bootloader]D:XilinxprojectsMicroZedMicroZedsdkFSPLDebugFSPL.elf
t[offset = 0x020000]D:XilinxprojectsMicroZedMicroZed.sdkdesign_1_wrapper_hw_platform_0design_1_wrapper.bit
t[offset = 0x280000]D:u-boot.elf
}
Than at 0x30.0000 are free space.
---- Edit 2:
That doesn't work, environments overwrites important data:
Saving Environment to SPI Flash...
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Erasing SPI flash...Writing to SPI flash...done
Uboot was configured to:
#define CONFIG_ENV_SECT_SIZEtt0x1000
#define CONFIG_ENV_OFFSETttt0x3000000
#define CONFIG_CMD_SAVEENV