New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should be possible to build with a RISC-V Linux toolchain #4
Comments
nano.spec comes from newlib-nano, which might be available as a package in Debian at least. See discussion here: starfive-tech/JH7100_secondBoot#3 |
for ddrinit the flags are slightly different
|
Hi, I'm rewriting this here in Rust for oreboot, which can then just be built with the default Rust toolchain. There is a lot of unnecessary code in this repo that is not about DRAM, e.g., SDIO and GPT. I will only translate the many magic values written to the many registers. |
Just FYI: The rewrite works fine. I've been using it all along; pending in this PR: oreboot/oreboot#606 With the JH7100 no longer produced (as it seems?), it may sound a bit odd to have gone through the effort. However, it turns out that the successor JH7110 has the same DRAM controller and PHY, just with some slightly different parameters, so we're working on that now, porting it over from StarFive's U-Boot code. Ours is orders of magnitude smaller and more efficient (only 25% binary size!). We will have SBI included in a single stage and hand over to LinuxBoot directly. Some minor issue remains though, likely with clocks. Otherwise, we're quite done: |
Right now, building the ddrinit code requires using the bare-metal toolchain provided from Sifive, it references a nano.spec gcc spec file that is apparently only available in the Sifive bare-metal toolchain. It should however be possible to build the ddrinit code with a regular Linux toolchain for RISC-V. This will make life much simpler for build systems such as Yocto/Buildroot. Both OpenSBI and U-Boot, while being bare-metal code, build perfectly fine with a Linux toolchain.
The text was updated successfully, but these errors were encountered: