-
Notifications
You must be signed in to change notification settings - Fork 115
Add a runner for libtock2 examples. #365
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
Conversation
dea7e41
to
3530195
Compare
This replaces tools/flash.sh. In the future, it will have functionality to process test output, and will therefore replace test_runner as well. It can currently deploy to Hifive1 on QEMU, and has untested logic to deploy via `tockloader`. It is no longer possible to use `cargo run` to deploy a Tock 1.0 libtock-rs process binary, as that will now use the Tock 2.0 runner. Additional changes: 1. added a `setup-qemu-2` build target to build the tock2 submodule's QEMU module. I intend to rename this to `setup-qemu` after the Tock 1.0 targets and submodules are removed. 2. I updated the tock2 submodule to a newer kernel. Because the new libtock-rs crates depend on post-2.0 Allow API guarantees, I updated to latest master.
Oh, hang on a bit while I debug the GitHub Actions workflows live... |
Oh, I think the
Also, here is an example invocation of the tool:
|
Update on the CI: Because This didn't occur on my system because I already had a working I'm going so see how much I need to disable to get CI to pass. |
…out having `flash.sh` as the runner.
I needed to disable the Tock 1.0 I'd prefer to keep those tests disabled rather than add a hack to support both. |
I'm not sure of this is the right place for this questions, but what about having the possibility to specify where the app should be loaded? Right now the runner assumes the app will be the only one (or the first) app running on the device. For this I assume that this utility should write a temporary linker file before building the app. |
This runner runs after |
Do you see this dynamic layout generation as a separate tool that would be run by build.rs maybe? |
My initial thought is yes, but upon further thought I realized that may exacerbate a race condition we may have: #366. So I agree with "maybe". |
I can try sketching something to build binaries for multiple slots and we can start experimenting from there. My question sis how is a slot defined? Would it be something like |
I don't know how a slot should be defined, that would be part of the design for the slotted layout integration. |
I took a stab at testing the tockloader version of this and was unable to get it to work:
It seems that tockloader (I am using tockloader master with a tiny patch to print the number of tbfs found, and the latest elf2tab) is not detecting a tbf header in the tab file. I haven't had a chance to dig into why this is |
1. Forward stdin to QEMU. 2. Add -serial mon:stdio to QEMU's flags. 3. Print the full IO error if we are unable to delete the TBF file before elf2tab invocation.
…for use with QEMU.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though the tockloader support doesn't work, this PR documents it as untested, and I think it is fine if this is merged so people can use the (useful) qemu runner until someone (hopefully me) has time to dig into the tockloader support issues
…rify runner's TBF_HEADER_SIZE value.
bors r+ |
The only major change from upstream that this preserves is customized external assembly linkage. This should be mostly removed once libtock switches to using `global_asm!` - now that that will be stabilized. This CL is a squash merge of the following commits: 28ebb70 Merge #365 a0440ba Merge #370 abff51c Merge #359 85242dc Merge #364 f1bd0d4 Merge #361 b0f8593 Merge #355 4c7ecb6 Merge #358 6f8b512 Merge #356 73cbbde Merge #357 022984f Merge #353 b2e6471 Merge #352 9eb12c0 Merge #351 This was retrieved with the following command: ``` git log ti50-internal/upstream/master --not \ $(git merge-base --all ti50-internal/upstream/master m/main) \ --first-parent ``` BUG=None TEST=ti50/common make build SOURCE=UPSTREAM(28ebb70) Change-Id: I0aa1606f407a0b4bcf0c76b62261414903479092
This replaces
tools/flash.sh
. In the future, it will have functionality to process test output, and will therefore replacetest_runner
as well.It can currently deploy to HiFive1 on QEMU, and has untested logic to deploy via
tockloader
.It is no longer possible to deploy Tock 1.0 libtock-rs apps using
cargo run
, ascargo run
will now invoke the new tool. This prevents us from running the Tock 1.0 libtock-rs integration test, so I have removed it frommake test
.I also make the following changes to the submodule setup:
setup-qemu-2
target to build QEMU in the tock2/ submodule. When I remove thetock/
submodule, I'll also remove thesetup-qemu
target and renamesetup-qemu-2
tosetup-qemu
to replace it.tock2/
submodule to a newer kernel. Becauselibtock-rs
depends on the new Allow API implementation that is not in a released Tock version, I used the latest master branch commit.