-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add JSON schemas #176
Merged
Merged
Add JSON schemas #176
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
995c061
Add partition table JSON schema
will-v-pi a858c18
Add permissions and whitelabel JSON schemas
will-v-pi ffd46a2
Add schema for otp contents json
will-v-pi 1f0df4b
Move into json/schemas folder, and use github urls in $schema
will-v-pi 512df57
Add JSON schemas to the readme
will-v-pi 9e7b543
Add OTP settings JSON schema
will-v-pi b8946b7
Review feedback
will-v-pi 1cfba88
Improve max_power and attributes validation
will-v-pi 380aac6
Further improve attributes regex
will-v-pi 52f98b7
Update $schema URLs to point at develop
will-v-pi 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 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 was deleted.
Oops, something went wrong.
This file contains 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,37 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/raspberrypi/picotool/develop/json/schemas/partition-table-schema.json", | ||
"version": [1, 0], | ||
"unpartitioned": { | ||
"families": ["absolute"], | ||
"permissions": { | ||
"secure": "rw", | ||
"nonsecure": "rw", | ||
"bootloader": "rw" | ||
} | ||
}, | ||
"partitions": [ | ||
{ | ||
"name": "A", | ||
"id": 0, | ||
"size": "2044K", | ||
"families": ["rp2350-arm-s", "rp2350-riscv"], | ||
"permissions": { | ||
"secure": "rw", | ||
"nonsecure": "rw", | ||
"bootloader": "rw" | ||
} | ||
}, | ||
{ | ||
"name": "B", | ||
"id": 1, | ||
"size": "2044K", | ||
"families": ["rp2350-arm-s", "rp2350-riscv"], | ||
"permissions": { | ||
"secure": "rw", | ||
"nonsecure": "rw", | ||
"bootloader": "rw" | ||
}, | ||
"link": ["a", 0] | ||
} | ||
] | ||
} |
This file contains 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 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 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,77 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "OTP Contents", | ||
"description": "Defined contents of the RP-series device OTP", | ||
"type": "array", | ||
"items": { | ||
"description": "OTP Row", | ||
"type": "object", | ||
"properties": { | ||
"crit": { | ||
"description": "Critical Row (use three-of-eight vote encoding)", | ||
"type": "boolean" | ||
}, | ||
"description": { | ||
"description": "Row Description", | ||
"type": "string" | ||
}, | ||
"ecc": { | ||
"description": "ECC Row", | ||
"type": "boolean" | ||
}, | ||
"fields": { | ||
"description": "Fields within row", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"description": { | ||
"description": "Field Description", | ||
"type": "string" | ||
}, | ||
"mask": { | ||
"description": "Field Bit Mask", | ||
"type": "integer" | ||
}, | ||
"name": { | ||
"description": "Field Name", | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["description", "mask", "name"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"mask": { | ||
"description": "Row Bit Mask", | ||
"type": "integer" | ||
}, | ||
"name": { | ||
"description": "Row Name", | ||
"type": "string" | ||
}, | ||
"redundancy": { | ||
"description": "Number of redundant rows", | ||
"type": "integer" | ||
}, | ||
"row": { | ||
"description": "OTP Row", | ||
"type": "integer" | ||
}, | ||
"seq_index": { | ||
"description": "Sequence Index", | ||
"type": "integer" | ||
}, | ||
"seq_length": { | ||
"description": "Sequence Length", | ||
"type": "integer" | ||
}, | ||
"seq_prefix": { | ||
"description": "Sequence Prefix", | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["crit", "description"], | ||
"additionalProperties": false | ||
} | ||
} |
This file contains 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,50 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "OTP Settings", | ||
"description": "OTP Settings", | ||
"type": "object", | ||
"properties": {"$schema": {}}, | ||
"patternProperties": { | ||
"^\\d{1,2}:\\d{1,2}$": { | ||
"description": "Generic OTP Row", | ||
"type": "object", | ||
"properties": { | ||
"ecc": { | ||
"description": "Protect with ECC", | ||
"type": "boolean" | ||
}, | ||
"value": { | ||
"description": "Value to write", | ||
"type": ["array", "string", "integer"], | ||
"pattern": "^0x[0-9a-fA-F]{1,6}$", | ||
"items": { | ||
"description": "Data Byte", | ||
"type": ["string", "integer"], | ||
"pattern": "^0x[0-9a-fA-F]{1,2}$" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": ["ecc", "value"] | ||
}, | ||
"^[\\d\\w_]+$": { | ||
"description": "Defined OTP Row", | ||
"type": ["object", "array", "string", "integer"], | ||
"pattern": "^0x[0-9a-fA-F]{1,6}$", | ||
"items": { | ||
"description": "Data Byte", | ||
"type": ["string", "integer"], | ||
"pattern": "^0x[0-9a-fA-F]{1,2}$" | ||
}, | ||
"patternProperties": { | ||
"^[\\d\\w_]+$": { | ||
"description": "OTP Field", | ||
"type": ["string", "integer"], | ||
"pattern": "^0x[0-9a-fA-F]{1,6}$" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
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.
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.
I guess
items
here could also be a$ref
, but I'll let you decide if it's worth it or not.