-
Notifications
You must be signed in to change notification settings - Fork 11
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
mainboard/pcengines: fix sign-of-life coreboot build date #517
mainboard/pcengines: fix sign-of-life coreboot build date #517
Conversation
@miczyg1, @krystian-hebel, @pietrushnic, and @michaelsteinmann who have all touched, merged, or commented on these date formats before. |
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
a656f15
to
73d8fde
Compare
@markmentovai let us analyze what you wrote, but please note it all is more about backward compatibility for customers who use sign-of-life in industrial environment parsing that strings over serial, then about some logic behind. We will try to revisit that with PC Engines and will get back to you. Thank you for your contribution. |
@markmentovai thank you for this analysis. I recall there was a discussion that resulted in current format, but I can't find any trace of it anymore, other than #213 you already linked. I'm OK with fixing it to something sane, if anyone will have an issue with that we can always revert it (assuming there is a good reason to do so). In order to preserve your excellent research, and to provide easy-to-find place for history of changes, I would like you to create a document in https://github.com/pcengines/apu2-documentation (or we can do this instead if you prefer, but I figure you may want to do the honors to have your name next to the commit). Just copying your first message into a new file will be good, after adding a new entry for your change. |
@krystian-hebel Sure, I’ll send a patch to pcengines/apu2-documentation. I’ll base it on the description above, but will update it to present it as fixed, changing all of the |
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by print_sign_of_life at early boot was incorrectly presented in yyyyddmm format, when it should have been yyyymmdd. pcengines/coreboot#517 contains a complete explanation of the history of this date string. Signed-off-by: Mark Mentovai <[email protected]>
The coreboot build date shown by
print_sign_of_life
at early boot was incorrectly presented inyyyyddmm
format, when it should have beenyyyymmdd
.For example, the current version, 4.16.0.4, was built on 2022-05-25 and released on 2022-05-26. It boots with the following sign-of-life message:
yyyyddmm
is not a date format that any ordinary person would expect or understand. It presents as a standardyyyymmdd
date seemingly referring to the 5th day of the 25th month of 2022, which of course is incorrect. The string should be presented ascoreboot build 20220525
, in properyyyymmdd
format.There’s a bit of history to this string, and I wanted to make sure that this wasn’t actually intentional, so I did all of the code archaeology to confirm that
yyyyddmm
was indeed unintentional and should be fixed to the expectedyyyymmdd
.Legacy History
yyyymmdd
mm/dd/yyyy
yyyymmdd
mm/dd/yyyy
yyyymmdd
yyyymmdd
mm/dd/yyyy
mm/dd/yyyy
yyyymmdd
mm/dd/yyyy
yyyyddmm
mm/dd/yyyy
Mainline History
mm/dd/yyyy
mm/dd/yyyy
mm/dd/yyyy
mm/dd/yyyy
mm/dd/yyyy
mm/dd/yyyy
mm/dd/yyyy
yyyymmdd
yyyymmdd
mm/dd/yyyy
mm/dd/yyyy
yyyyddmm
yyyyddmm
yyyyddmm
yyyyddmm
yyyyddmm
mm/dd/yyyy
yyyyddmm
mm/dd/yyyy
yyyyddmm
mm/dd/yyyy
Discussion
Both the sign-of-life date format and SMBIOS/DMI date format were variously correct and broken throughout time on both legacy and mainline branches, and were correct until late 2017, when the formats started changing during the DMI date fiasco. The current
yyyyddmm
format can be traced to mainline 10fa08f which attempted to fix both the sign-of-life date and the SMBIOS/DMI date, but failed on both counts. The SMBIOS/DMI date was subsequently fixed in #197 without any real discussion of the sign-of-life date.Shortly thereafter, #213 fixed the SMBIOS/DMI date on the legacy branch, while simultaneously breaking the sign-of-life date. That pull request has some discussion of the unusual format, starting at #213 (comment). Unfortunately, the discussion was resolved incorrectly at #213 (comment) by stating that
yyyyddmm
was intentionally chosen to match what was then current on the mainline branch. This occurred just months after the mainline branch had acquired the bug in 10fa08f, so while the legacy branch was being synced with the then-current mainline behavior, it was actually mimicking a recently introduced bug. #213 (comment) also claims to have corroborated with an APU2 ROM binary purportedly dated 2016-09-12 and identifying itself in its sign-of-life as 20161209. I haven’t found a binary bearing this date, but I did find:coreboot build 20160304
(yyyymmdd
)coreboot build 20170228
(yyyymmdd
)coreboot build 20170531
(yyyymmdd
)Having found three apu2 firmware versions from both before and after the purported 2016-09-12 (or is it 2016-12-09?) firmware that adhere properly to the
yyyymmdd
format, I question the claim in #213 (comment) thatyyyyddmm
was ever valid, and that employing this format was in fact maintaining the status quo.This analysis clarifies that
yyyyddmm
is an error, and it should be corrected toyyyymmdd
which is the proper historical form dating to the beginning of the visible legacy branch history in early 2016, as well as the sensible form for this date.