Add kernel version header implementation#30
Merged
bradjc merged 5 commits intotock:masterfrom Jul 30, 2021
Merged
Conversation
2 tasks
bradjc
reviewed
Jul 29, 2021
Co-authored-by: Brad Campbell <bradjc5@gmail.com>
cf48168 to
15a061f
Compare
hudson-ayers
approved these changes
Jul 30, 2021
Contributor
hudson-ayers
left a comment
There was a problem hiding this comment.
I don't see anything in the updated diff that looks like it could interfere with Alistair's work that was merged before this, I think it is good to go
bradjc
approved these changes
Jul 30, 2021
bors Bot
added a commit
to tock/tock
that referenced
this pull request
Jul 30, 2021
2669: [rfc] Comptibility header (v1) r=bradjc a=alexandruradovici ### Pull Request Overview This pull request adds a compatibility header to the TBF. This is the first version of such a header. The idea is to add the ability to the kernel to ignore and not load the processes that do not meet the kernel compatibility constraints defined in this header. This defines a fixed header that contains: - the exact kernel major version - the minimum kernel minor version Processes that provide a `KernelVersion` header state that the exact required kernel version and the minimum required kernel minor version. For instance, if a process specifies kernel version 2.12, this means it requires a kernel version that is >= 2.12 and < 3.0. ### Testing Strategy This was tested using a Microbit v2 and libtock-c with the new elf2tab (tock/elf2tab#30). EDIT: Tockloader seems to send over to the board unknown TLV headers as this works with the unmodified tockloader. ### TODO or Help Wanted 1. I'm not sure where to define the running kernel version. For now this is defined as two constants in `kernel/src/lib.rs`. Another idea was to define them within the `Config` structure. The printed kernel version is taken from the git release, which, at least for the development tree, is difficult to parse 2. Improvement to the debug messages ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Alexandru Radovici <msg4alex@gmail.com> Co-authored-by: Alexandru Radovici <alexandru.radovici@wyliodrin.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds the
KernelVersionheader implementation defined in tock/tock#2669.