Git Product home page Git Product logo

Comments (14)

avpatel avatar avpatel commented on June 25, 2024

Strange, I had tested U-Boot-2019.10 release with OpenSBI v0.5 release.

Can you provide exact steps to reproduce this compile error ?

from opensbi.

davidlt avatar davidlt commented on June 25, 2024

That's exactly the versions I am using. The following worked:

  • QEMU virt with kernel payload;
  • QEMU virt with U-Boot payload;

So only SiFive FU540 with U-Boot payload fails (tried twice on different hosts, i.e. boards).

Full build log is here (incl. commands being executed): http://fedora.riscv.rocks/kojifiles/work/tasks/5439/315439/build.log

I just tagged older binutils 2.32 to F32/Rawhide to check if this is due to changes in binutils (most likely).

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

Can you also tell us size of hifive-unleashed-a00.dtb and sifive_fu540/u-boot.bin ?

It would be even better if you can send us above binaries via google driver (or something else).

Regards,
Anup

from opensbi.

davidlt avatar davidlt commented on June 25, 2024

Huh, 2.32 produced the same issue. You can extract those from RPMs, .e.g:

rpm2cpio 'http://fedora.riscv.rocks/kojifiles/packages/kernel/5.4.0/0.rc3.git2.300.1.riscv64.fc32/riscv64/kernel-core-5.4.0-0.rc3.git2.300.1.riscv64.fc32.riscv64.rpm' | cpio -dvim

This should be the DTB /lib/modules/5.4.0-0.rc3.git2.300.1.riscv64.fc32.riscv64/dtb/sifive/hifive-unleashed-a00.dtb
For the U-Boot image:

rpm2cpio 'http://fedora.riscv.rocks/kojifiles/packages/uboot-tools/2019.10/2.0.riscv64.fc31/noarch/uboot-images-riscv64-2019.10-2.0.riscv64.fc31.noarch.rpm' | cpio -dvim

That should have /usr/share/uboot/sifive_fu540/u-boot.bin

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

This seems to be a know issue with RISC-V binutils.

Refer, riscv-collab/riscv-gnu-toolchain#298

Can you try adding line ".option norelax" before line "#ifdef FW_PAYLOAD_FDT_PATH" in firmware/fw_payload.S ?

Regards,
Anup

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

Alternately, can you also try replacing ".align 4" with ".balign 16" in firmware/fw_payload.S ?

Regards,
Anup

from opensbi.

davidlt avatar davidlt commented on June 25, 2024

.option norelax seems to solve the problem, but changing .align 4 to balign 16 does not.

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

Cool, thanks for trying my suggestion.

The issue will only manifest when we are embedding DTB in FW_PAYLOAD and DTB size is not multiple of 16 bytes.

You can send patch to OpenSBI. Please mention the GCC binutils issue in your commit description as well.

Regards,
Anup

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

I send patch to OpenSBI to fix this issue.

I was not able to reproduce this issue with Bootlin toolchain so I guess lot of people might not be seeing this issue.
(Refer, https://toolchains.bootlin.com/)

Can you provide Tested-by to my patch ?

Regards,
Anup

from opensbi.

davidlt avatar davidlt commented on June 25, 2024

I noticed that. I just started a test build with my own patch and your patch arrived. I killed my build and pulled in your patch instead. I will send Tested-by within 30 minutes if nothing goes wrong.

One nitpick, why .option pop is not aligned to .option push in your patch?

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

You did not acknowledge that you will send patch so I thought you might be busy.

My bad, I should have waited little longer for your patch.

The ".option push" will save current options and ".options pop" will restore previously saved options. This is done same way Linux head.S as well.

Regards,
Anup

from opensbi.

davidlt avatar davidlt commented on June 25, 2024

What I wanted to say is that indentation is different between push and pop lines.

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

Ahh, the difference in indentation is typo. I will fix it.

Regards,
Anup

from opensbi.

avpatel avatar avpatel commented on June 25, 2024

Fix for this is now merged. Closing this issue.

Regards,
Anup

from opensbi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.