Here’s a few comments in an attempt to be helpful.
I believe that the HPS first stage boot looks for a partition table. If no partition table exists then the preloader should be written to address zero (start of the card). I’ve never done this but I would guess that it might be done as follows:
- insert card in a system running Linux
- execute fdisk -l to see if it’s /dev/sdb etc…
- assuming card is at /dev/sdb
- filename below is default for Arria10
dd if=uboot_w_dtb-mkpimage.bin of=/dev/sdb bs=64k seek=0
If the card has a partition table then the HPS looks for the first partition type A2 (raw). It can be any partition number but the first A2 partition must contain the preloader. Assuming you’ve used partition 2 for the card you’d write it like this:
dd if=uboot_w_dtb-mkpimage.bin of=/dev/sdb2 bs=64k seek=0
To update a preloader in a running system on partition 2 (for Arria10 it’s the preloader and u-boot all in one binary) you’d do it like this:
dd if=uboot_w_dtb-mkpimage.bin of=/dev/mmcblk0p2 bs=64k seek=0
You can also read the preloader back to do a binary comparison if you’d like:
- read it
dd if=/dev/mmcblk0p2 of=mypreloader.bin bs=64k seek=0 count=16
diff mypreloader.bin uboot_w_dtb-mkpimage.bin
I’ve only booted Cyclone V and Arria10 devices using a partition table. I’ve used different partitions (p2 and p3) for the preloader with no issue. I’ve also placed additional RAW A2 partitions on a card and observed that only the first A2 partition is used for the preloader. For Cyclone V you must also have a u-boot binary on the card. I’m not sure how this would work with no partitions. I’ve typically made partition 1 a FAT with u-boot and partition 2 a RAW partition with the preloader (no u-boot binary needed on FAT for Arria10). I started by using a script supplied with one of the GSRD downloads to make the partition table. You can do all of this manually with fdisk and mkfs to partition and format the card mcanually if you prefer. Search for making an SD card on Rocketboards for examples and more info.
Hope this was helpful.