# Building OpenSBI and Uboot

**URL:** <https://forums.sifive.com/t/building-opensbi-and-uboot/7681>\
**Category:** HiFive Premier P550\
**Created:** [January 29, 2026, 9:09am UTC](https://forums.sifive.com/t/building-opensbi-and-uboot/7681 "2026-01-29T09:09:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ganboing](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@ganboing](https://forums.sifive.com/u/ganboing)\
**Post date:** [January 30, 2026, 3:28am UTC](https://forums.sifive.com/t/building-opensbi-and-uboot/7681/2 "2026-01-30T03:28:14Z")

</div>

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](https://github.com/sifiveinc/meta-sifive/tree/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](https://github.com/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](https://github.com/sifiveinc/meta-sifive/blob/rel/meta-sifive/hifive-premier-p550/recipes-bsp/bootchain/files/nsign.cfg)
- 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](https://github.com/riscv-software-src/opensbi/commit/e5797e0688c187168ed9632b955cbe68da97f7f7) **Note** : you must use this u-boot branch [GitHub - ganboing/u-boot-eic7x at eic7x-dt-fix](https://github.com/ganboing/u-boot-eic7x/tree/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](https://github.com/sifiveinc/meta-sifive/blob/098ca1765fdebdad5d09d62be9731bca73280274/recipes-bsp/opensbi/opensbi-sifive-hf-prem_1.6.bb#L32). Their code is quite messy and can be buggy: E.g., [[P550] OpenSBI patch is buggy · Issue #57 · sifiveinc/meta-sifive · GitHub](https://github.com/sifiveinc/meta-sifive/issues/57) 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](https://discord.com/channels/880590043293548574/1301004036778098811)

---

_[View the full topic](https://forums.sifive.com/t/building-opensbi-and-uboot/7681)._
