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.
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 flattened device tree/devicetree blobs specification #467
add flattened device tree/devicetree blobs specification #467
Changes from 14 commits
453d819
e5596d5
efc6f28
41345e4
f68d07c
5f5ba2f
ce10d84
0ea5632
7fc9eff
c4551e5
1215a2b
5b83d43
b3b6979
41155f6
4d87410
a8331ca
4e11912
ca73d6c
87ab85b
856a5c4
c048a09
8037492
65f9e70
45d9065
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This name is misleading, at least to me - if I see last compatible version I imagine the latest one (i.e. the one that came last), not the lowest or earliest. However, it's clear that the spec intended the exact opposite:
I'm not sure why did the spec authors choose
last_
adjective in the name. Probably when you imagine the latest version as the "first", then you go further into the version history and declare the oldest compatible version as the "last" that would the current version be compatible with (if we went beyond the "last", any older versions would no longer work). However, this concept seems to be upside down - I guess it's natural that "last" should mean latest (the last one that has been released so far) and the "first" would mean the initial version, i.e. the oldest version. In this justification for the spec's naming that I came up with, I needed to reverse the timeline and the role of "first" and "last" pointers (we go back in time).Does
first_compatible_version
,oldest_compatible_version
,lowest_compatible_version
ormin_compatible_version
make more sense? Which one would you choose?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.
According to https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf (section 5.3 Memory Reservation Block > 5.3.2 Format, page 47/56), this lacks inner structure:
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.
That is correct. I skipped this part, as for my particular use case it is not interesting. Also, none of the test files I looked at actually had anything useful in there, except the terminator.
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 have added this now as well.
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.
Isn't there a more meaningful enum name? I guess that
fdt
is an abbreviation of Flattened Devicetree Format, not something like token type.Please don't forget about
kaitai_struct_formats/database/dtb.ksy
Lines 88 to 90 in c4551e5
if you rename it.
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 don't like the word
token
here, maybe justtype
?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.
The reason I called it token is because they are called that in the documentation:
https://github.com/devicetree-org/devicetree-specification/blob/v0.3/source/flattened-format.rst#lexical-structure
Perhaps because they are in an element
fdt_note
it can indeed be justtoken
. @generalmimon any thoughts?