Clarify a few things:
The bootchain is a basically a tarball in ESWIN’s format that can be read by the ROM of the chip. It describes different stage images, such as secondary init second_boot_fw, DDR init ddr_fw.bin, and the actual bootloader fw_payload.bin (opensbi+u-boot). What actually happened is the small 32-bit SCPU core starts first on power-on and runs ROM, then it parses from the bootchain in SPI flash and invokes secondary init + DDR init. Finally it copies bootloader (opensbi+u-boot) to DRAM, and kick start the 64-bit MCPU cores. This kind of bootchain is packaged by Esbd-77serial-nsign. second/ddr_fw are all closed source blobs from ESWIN, but bootloader we can change it.
If you go the meta-sifive route, then there’s no need to care about the versioning of different components. They are already specified by the manifest files. Just check-out this branch GitHub - sifiveinc/meta-sifive at rel/meta-sifive/hifive-premier-p550 and it’ll describe all the git commits of all repos + any private patches applied on top of it.
If you decide to do everything manually, then mimic what meta-sifive does is a good start. For me, I do everything manually for bootchain, and what I learned:
- For Esbd-77serial-nsign, just use the latest version. Check-out GitHub - eswincomputing/Esbd-77serial-nsign and reuse the config file from meta-sifive: meta-sifive/recipes-bsp/bootchain/files/nsign.cfg at rel/meta-sifive/hifive-premier-p550 · sifiveinc/meta-sifive · GitHub
- For u-boot/opensbi, need to be careful. opensbi doesn’t ship any device-trees, so it uses (and actually shares) the same device-trees from u-boot. If there’s incompatibility, it’ll crash on boot. You can try the upstream latest version of opensbi, in which I just added support for EIC770x/P550 before new year. You can follow instructions here: platform: generic: eswin: add EIC7700 · riscv-software-src/opensbi@e5797e0 · GitHub Note: you must use this u-boot branch GitHub - ganboing/u-boot-eic7x at eic7x-dt-fix because the vendor u-boot device-tree has inconsistencies from the Linux upstream, and I fixed that. It simplified many things, and got rid of those crazy build parameters (see below).
- For u-boot/opensbi, you can also go the vendor way by strictly follow what meta-sifive uses and check-out the corresponding git commits and apply those patches. You also must supply the exact same parameters to build opensbi, such as meta-sifive/recipes-bsp/opensbi/opensbi-sifive-hf-prem_1.6.bb at 098ca1765fdebdad5d09d62be9731bca73280274 · sifiveinc/meta-sifive · GitHub. Their code is quite messy and can be buggy: E.g., [P550] OpenSBI patch is buggy · Issue #57 · sifiveinc/meta-sifive · GitHub Hence I decided to take matters in to my own hands.
For u-boot/OS compatibility, no need to worry so much. Ubuntu carries it’s own device-tree for kernel, and kernel/grub speaks EFI protocol to u-boot, so it’s properly interfaced.
And yes, you can es_burn the new bootchain to the board. Just make sure you know how to recover the board before attempting. Following the board recover procedure is a good exercise.
BTW, you can use the discord channel from Works with RISC-V to chat on eic770x/p550: Discord