In the VYBRIDRM, chapter 126.96.36.199 the format of the secondary image table is described. I'm trying to create a secondary image table with a hex editor. Currently it looks like this:
$ hexdump secondaryImageTable
0000000 0000 0000 0000 0000 2233 0011 0000 0000
I set the PERSIST_SECONDARY_BOOT in u-boot. I assume this is working, because the soft reset doesn't work anymore after u-boot starts. A memory dump in u-boot also shows that the bit is set correctly. But I think something is wrong with my secondary image table. I have written zeroes for the reserved chipNum and driveType fields, assuming they are both 32bits wide. Then I've written the tag (0x00112233). I've tried both big and little endian, it still doesn't work. For firstSectorNumber I use 0, because for now I want to boot just the normal image to see that it's working. I've written the secondary image table to my SD card at address 0x200:
dd if=secondaryImageTable of=/dev/sdd seek=1 bs=512
What am I doing wrong here?
I also don't understand why the VYBRIDRM says: "If PERSIST_SECONDARY_BOOT is 0, the boot ROM uses address 0x0 for primary
image." At adress 0x0 the master boot record of the SD card is stored. The IVT is at address 0x400.