-
Notifications
You must be signed in to change notification settings - Fork 219
add specification for Reolink firmware files #667
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
Open
armijnhemel
wants to merge
7
commits into
kaitai-io:master
Choose a base branch
from
armijnhemel:reolink
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ae431d5
add specification for Reolink firmware files
armijnhemel 580c839
reolink: correctly compute the number of sections (also subtract the …
armijnhemel 67c1df4
reolink: clarify license, crc
armijnhemel 6f89793
reolink: do not hardcode sizes of partition and section when computin…
armijnhemel db0f096
reolink: add support for 64 bit files
armijnhemel be6e4ba
reolink: change license (sync with upstream source), change doc-ref
armijnhemel 8be72c8
reolink: change id, add file-extension
armijnhemel 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| meta: | ||
| id: reolink | ||
| title: Reolink firmware update | ||
| license: MIT | ||
| endian: le | ||
| encoding: UTF-8 | ||
| doc-ref: | ||
| - https://github.com/vmallet/pakler/blob/acbf084b/pakler/__init__.py | ||
| seq: | ||
| - id: header | ||
| type: | ||
| switch-on: is_64 | ||
| cases: | ||
| true: header64 | ||
| false: header32 | ||
| - id: sections | ||
| type: | ||
| switch-on: is_64 | ||
| cases: | ||
| false: section32 | ||
| true: section64 | ||
| repeat: expr | ||
| repeat-expr: num_sections | ||
| - id: partitions | ||
| type: partition | ||
| repeat: expr | ||
| repeat-expr: num_sections | ||
| instances: | ||
| header_crc32: | ||
| pos: 4 | ||
| type: u4 | ||
| is_64: | ||
| value: header_crc32 == 0 | ||
| num_sections: | ||
| value: header.as<header32>.num_sections | ||
| types: | ||
| header32: | ||
| seq: | ||
| - id: magic | ||
| contents: [0x13, 0x59, 0x72, 0x32] | ||
| - id: crc32 | ||
| type: u4 | ||
| - id: board | ||
| size: 4 | ||
| instances: | ||
| first_section: | ||
| io: _root._io | ||
| pos: sizeof<header32> | ||
| type: section32 | ||
| num_sections: | ||
| value: (first_section.ofs_section - sizeof<header32>) / (sizeof<section32> + sizeof<partition>) | ||
| header64: | ||
| seq: | ||
| - id: magic | ||
| contents: [0x13, 0x59, 0x72, 0x32, 0x00, 0x00, 0x00, 0x00] | ||
| - id: crc32 | ||
| type: u8 | ||
| - id: board | ||
| size: 8 | ||
| instances: | ||
| first_section: | ||
| io: _root._io | ||
| pos: sizeof<header64> | ||
| type: section64 | ||
| num_sections: | ||
| value: (first_section.ofs_section - sizeof<header64>) / (sizeof<section64> + sizeof<partition>) | ||
| section32: | ||
| seq: | ||
| - id: name | ||
| size: 32 | ||
| type: strz | ||
| - id: version | ||
| size: 24 | ||
| - id: ofs_section | ||
| type: u4 | ||
| - id: len_section | ||
| type: u4 | ||
| instances: | ||
| section: | ||
| io: _root._io | ||
| pos: ofs_section | ||
| size: len_section | ||
| section64: | ||
| seq: | ||
| - id: name | ||
| size: 32 | ||
| type: strz | ||
| - id: version | ||
| size: 24 | ||
| - id: ofs_section | ||
| type: u8 | ||
| - id: len_section | ||
| type: u8 | ||
| instances: | ||
| section: | ||
| io: _root._io | ||
| pos: ofs_section | ||
| size: len_section | ||
| partition: | ||
| seq: | ||
| - id: name | ||
| size: 32 | ||
| type: strz | ||
| - id: ofs_partition | ||
| type: u4 | ||
| - id: mtd | ||
| size: 32 | ||
| type: strz | ||
| - id: start_address | ||
| size: 4 | ||
| - id: len_partition | ||
| type: u4 | ||
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.