riscv-software-src / riscv-software-src/opensbi

make clean requires PLATFORM to be valid

Open
#217 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.5k
Forks
712
PR merge metrics
No merged PRs in 30d

Description

Calling make clean requires PLATFORM to be valid. Is this intended or should cleaning always work because all that really matters for the cleaning process is the parameter O=some/output/path? I'm running in this issue because my build process has has an environment variable PLATFORM=acme3000 set, which is something different than what openSBI understands. The builds process runs:

make -s -C "${OPENSBI_PATH}" O=xxx clean
make -C "${OPENSBI_PATH}" O=xxx PLATFORM=generic ...

an so the cleaning step sees PLATFORM=acme3000 and it fails in the makefile at

# Include platform specifig config.mk
ifdef PLATFORM
include $(platform_src_dir)/config.mk
endif

I'd propose that cleaning will ignore PLATFORM as long as this is not absolutely necessays

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Makefile section that includes platform-specific config.mk, and reproduce the failure with make -s -C "${OPENSBI_PATH}" O=xxx clean while an invalid PLATFORM is set. Check whether the clean target can run using only O; done means cleaning succeeds despite PLATFORM=acme3000 while the subsequent PLATFORM=generic build remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.