-
Notifications
You must be signed in to change notification settings - Fork 487
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
fw_payload.o(.text+0x1961): 15 bytes required for alignment to 16-byte boundary, but only 14 present #140
Comments
Strange, I had tested U-Boot-2019.10 release with OpenSBI v0.5 release. Can you provide exact steps to reproduce this compile error ? |
That's exactly the versions I am using. The following worked:
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). |
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, |
Huh, 2.32 produced the same issue. You can extract those from RPMs, .e.g:
This should be the DTB
That should have |
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, |
Alternately, can you also try replacing ".align 4" with ".balign 16" in firmware/fw_payload.S ? Regards, |
|
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, |
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. Can you provide Tested-by to my patch ? Regards, |
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 |
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, |
What I wanted to say is that indentation is different between push and pop lines. |
Ahh, the difference in indentation is typo. I will fix it. Regards, |
Fix for this is now merged. Closing this issue. Regards, |
I have updated binutils to 2.33.1 in Fedora 32/Rawhide and looks like I cannot recompile opensbi (there are no changes compared to F31 build).
Other changes between F31 and F32 today is kernel (5.3 vs master branch) and glibc (2.30 vs master branch).
The text was updated successfully, but these errors were encountered: