Skip to content

Conversation

hieuhuynh-ampere
Copy link

Fix compilation error on new OpenBMC codebase by correct tab on somes
code to fix "this ‘if’ clause does not guard... [-Wmisleading-indentation]"
warning.
This commit also correct the size of variables to fix
"[-Werror=stringop-overflow=]" error.

Signed-off-by: Hieu Huynh hieuh@os.amperecomputing.com

Fix compilation error on new OpenBMC codebase by correcting tabs to fix
"this ‘if’ clause does not guard... [-Wmisleading-indentation]" warning.
This commit also corrects the size of variables to fix
"[-Werror=stringop-overflow=]" error.

Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com>
Copy link
Collaborator

@dgoehring-ampere dgoehring-ampere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some issues need to be addressed...

  1. The openocd.bb file that OpenBMC uses is located at:
    openbmc/meta-ampere/meta-jade/recipes-ampere/openocd/openocd.bb

The file references the "ampere_openocd_v1.2.0" branch, not the AmpereComputing:master branch. To address this fix, a new branch needs to be created.

From openocd.bb...
#Remote Git Repository
SRC_URI = "git://github.com/AmpereComputing/ampere-openocd.git;protocol=https;branch=ampere_openocd_v1.2.0"

The openocd.bb file also hardcodes the SRCREV, therefore updating ampere_openocd_v1.2.0 won't resolve the issue. A new branch needs to be created along with update SRCREV.
SRCREV = "32a2a48bbf323977bc09f720476fcfbad0ee46be"

  1. I think the best course of action is to pick up the latest OpenOCD files which include a gcc11 fix.
    https://sourceforge.net/p/openocd/code/ci/6db49eb8858023654084088c73d968e190aec491/

In summary, while this patch addresses the gcc11 build issue, it can't be applied to this branch and the openocd.bb file needs to be updated to reflect the new branch and SRCREV. Best option going forward is for me to update OpenOCD with the latest source which includes the gcc11 fix.

What is the timeframe that a new OpenOCD drop needs to be available?

dgoehring-ampere pushed a commit that referenced this pull request Jul 1, 2025
Add SWD multidrop setting.
Fix the name of AP #1 to AUX-AP
Set AUX-AP CSW Prot bit[0] to make RISC-V debug accessible on AUX-AP.

Change-Id: I496e07acfe90dd858e4403176a8330d8c1a0b560
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8752
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants