Repository navigation
platform: Move the OpenVM platform to this package (bflat manifest schema 2) #5
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cfe8891
build: move the bflat manifest to schema 2
maximmenshikov 916b241
platform: define the OpenVM platform for bflat
maximmenshikov e28e316
platform: implement bflat's platform interface for OpenVM
maximmenshikov f179c0a
docs: Point to platform/entry.S for the guest _start
maximmenshikov d947b71
platform: Require guest_subst, the new name of zisk_subst
maximmenshikov 8974936
platform: Remove the no-fpu flag
maximmenshikov 353b64b
release: Sign the nupkg for bflat
maximmenshikov 2c80756
platform: Give the RyuJIT tuning that bflat had fixed
maximmenshikov 0d95964
release: Sign in the reusable workflow of bflat-riscv64
maximmenshikov a6fe372
release: Stop when the release of the version exists
maximmenshikov e6a0c17
release: Tag the commit that was built
maximmenshikov 34bbc0a
release: Give the actions and sign.yml by the SHA of a commit
maximmenshikov e296f6e
runner: Run the guest on the standard configuration, with no openvm.toml
maximmenshikov e2bc6d4
ci: Run the u256 and secp256k1 guests on the runner of the commit
maximmenshikov 1ffdf10
ci: Link the guests with the bflat of refactor/prep
maximmenshikov 0c946a1
ci: Link the guests with the bflat of master
maximmenshikov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,15 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/NethermindEth/bflat-riscv64/master/src/bflat/bflat-manifest.schema.json", | ||
| "schema": 2, | ||
| "name": "libopenvm", | ||
| "package_version": "1.0.0", | ||
| "builds": [ | ||
| "version": "1.0.0", | ||
| "description": "OpenVM accelerators (libopenvm) for bflat guests", | ||
| "when": {"platform": "openvm"}, | ||
| "objects": [ | ||
| { | ||
| "arch": "riscv64", | ||
| "os": "linux", | ||
| "libc": "openvm", | ||
| "static_lib": "libopenvm.a" | ||
| "file": "libopenvm.a", | ||
| "group": "pre-entry", | ||
| "note": "In front of the linker script, where bflat linked --extlib static libraries before schema 2." | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| #!/bin/bash | ||
| # Builds the OpenVM platform for bflat guests into the output directory (the | ||
| # first argument; default: output/ in the repository): | ||
| # | ||
| # - openvm_entry.o: entry.S assembled; the _start of the guest and the halt protocol | ||
| # - openvm.ld: the memory map (linker script) | ||
| # - openvm.bflat.manifest: the platform manifest (docs/manifest.md in bflat-riscv64) | ||
| # | ||
| # It needs only binutils for riscv64, not the bindings library, so bflat's | ||
| # own CI uses it to link guests for this platform. build/build.sh calls it | ||
| # for the package. | ||
| set -e | ||
|
|
||
| fail() { echo "$@" >&2; exit 1; } | ||
|
|
||
| PLATFORM_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| OUTPUT_DIR="${1:-$(cd "${PLATFORM_DIR}/.." && pwd)/output}" | ||
| AS="${AS:-riscv64-linux-gnu-as}" | ||
|
|
||
| command -v "${AS}" >/dev/null 2>&1 || fail "${AS} not found (apt install binutils-riscv64-linux-gnu)" | ||
| mkdir -p "${OUTPUT_DIR}" | ||
|
|
||
| # rv64ima and the soft-float ABI: the flags bflat used for its entry modules. | ||
| "${AS}" --march=rv64ima --mabi=lp64 "${PLATFORM_DIR}/entry.S" -o "${OUTPUT_DIR}/openvm_entry.o" \ | ||
| || fail "failed to assemble entry.S" | ||
| # Clear the float-ABI marker (e_flags, offset 0x30) so that ld.lld accepts the | ||
| # object against the guest's soft-float crt1.o. | ||
| printf '\x00' | dd of="${OUTPUT_DIR}/openvm_entry.o" bs=1 seek=48 count=1 conv=notrunc status=none | ||
|
|
||
| for f in openvm.ld openvm.bflat.manifest ; do | ||
| cp "${PLATFORM_DIR}/${f}" "${OUTPUT_DIR}/${f}" || fail "failed to copy ${f}" | ||
| done | ||
|
|
||
| echo "Platform: ${OUTPUT_DIR}/openvm_entry.o openvm.ld openvm.bflat.manifest" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.