-
Notifications
You must be signed in to change notification settings - Fork 230
tools: Add versions table #824
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
Merged
Merged
Changes from all commits
Commits
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,124 @@ | ||
| # firmware-2711 firmware versions | ||
| # | ||
| # Maps each pieeprom-YYYY-MM-DD.bin to the BUILD_TIMESTAMP | ||
| # and source git hash embedded in the binary, plus the | ||
| # release (default / latest / old) the file lives in. When | ||
| # a binary appears in more than one release the highest- | ||
| # precedence one wins: | ||
| # default > latest > old (old = archived) | ||
| # | ||
| # Generated by tools/update-versions-txt. Sorted newest-first. | ||
| # | ||
| # version build_epoch fw_git_hash release | ||
| 2026-04-14 1776201421 9cd61c53 latest | ||
| 2026-02-23 1771858593 85353ce4 latest | ||
| 2026-02-06 1770387236 8124798b latest | ||
| 2026-01-09 1767975133 d76c4603 default | ||
| 2025-12-08 1765221822 2226a853 default | ||
| 2025-11-27 1764248255 15a40aaa old | ||
| 2025-11-21 1763732017 b8803387 old | ||
| 2025-11-05 1762363706 57db150d default | ||
| 2025-10-14 1760460013 9eb0c93b old | ||
| 2025-10-08 1759940158 a06c733f old | ||
| 2025-10-03 1759483221 9a1b610a old | ||
| 2025-09-23 1758616461 769789e3 old | ||
| 2025-09-22 1758545484 9652cde4 old | ||
| 2025-08-27 1756321032 000d3ca2 old | ||
| 2025-08-20 1755703624 cd866525 old | ||
| 2025-08-13 1755093990 bb80e517 old | ||
| 2025-07-17 1752740805 3c628896 old | ||
| 2025-07-03 1751554605 ab660caa old | ||
| 2025-05-16 1747391644 91d7b7b2 old | ||
| 2025-05-08 1746717695 69471177 default | ||
| 2025-02-24 1740417042 46cf6982 old | ||
| 2025-02-11 1739293213 75c1e570 old | ||
| 2024-12-07 1733575168 3858f977 old | ||
| 2024-10-21 1729520694 951e1cc9 old | ||
| 2024-10-10 1728553618 0e63dd5e old | ||
| 2024-09-05 1725562327 7fe8d029 old | ||
| 2024-07-30 1722344555 5f18ffb6 old | ||
| 2024-05-17 1715945218 72caf667 old | ||
| 2024-04-17 1713358296 0b7b6f28 old | ||
| 2024-04-15 1713186734 e608a69d old | ||
| 2024-01-22 1705920081 51ed67b0 old | ||
| 2024-01-18 1705586363 ae876639 old | ||
| 2023-05-11 1683786363 4fd8f1f3 old | ||
| 2023-01-11 1673458852 8ba17717 old | ||
| 2023-01-04 1672828069 22bd34fb old | ||
| 2022-12-07 1670423055 0fc8fc8e old | ||
| 2022-11-25 1669373653 850fab5f old | ||
| 2022-11-04 1667575155 febe323f old | ||
| 2022-11-02 1667386433 f4b30559 old | ||
| 2022-10-18 1666090664 23aa699d old | ||
| 2022-10-12 1665588475 0f63db7b old | ||
| 2022-10-06 1665061876 a518b112 old | ||
| 2022-10-03 1664799047 12e1a84f old | ||
| 2022-09-02 1662127812 0b3f4b5e old | ||
| 2022-08-02 1659455705 91b6280c old | ||
| 2022-07-26 1658829273 adb94cfb old | ||
| 2022-07-22 1658493469 4fde6470 old | ||
| 2022-07-19 1658241329 253a5190 old | ||
| 2022-07-14 1657813807 aaa87904 old | ||
| 2022-05-20 1653034678 0213db9e old | ||
| 2022-04-26 1650968668 507b2360 old | ||
| 2022-04-14 1649949890 507b2360 old | ||
| 2022-03-10 1646913432 778c182c old | ||
| 2022-02-28 1646054646 969fb9b1 old | ||
| 2022-02-16 1645048791 2be30cb4 old | ||
| 2022-02-08 1644341086 f1e0407d old | ||
| 2022-02-04 1643976188 a26faf97 old | ||
| 2022-01-25 1643121041 6efe41bd old | ||
| 2022-01-20 1642680124 6efe41bd old | ||
| 2021-12-02 1638443283 78ec5746 old | ||
| 2021-11-22 1637580212 3c912e10 old | ||
| 2021-10-27 1635349629 ada4d997 old | ||
| 2021-10-05 1633420437 a6afaeaa old | ||
| 2021-10-04 1633339740 abb81f88 old | ||
| 2021-09-27 1632749428 39e76747 old | ||
| 2021-09-23 1632413480 ae05cfb4 old | ||
| 2021-07-06 1625568293 c258ef8f old | ||
| 2021-06-25 1624617942 86aa3d46 old | ||
| 2021-06-17 1623917100 8f216048 old | ||
| 2021-06-11 1623418752 37f642ea old | ||
| 2021-05-19 1621439514 5c860865 old | ||
| 2021-04-29 1619712685 c2f8c388 old | ||
| 2021-03-18 1616057651 1b43d5b6 old | ||
| 2021-03-17 1615980336 05552182 old | ||
| 2021-03-04 1614783295 0e0a5833 old | ||
| 2021-02-16 1613481816 d6d82cf9 old | ||
| 2021-01-16 1610806213 d1be7b5b old | ||
| 2021-01-11 1610379873 a36abf55 old | ||
| 2021-01-05 1609862995 e4cda8a7 old | ||
| 2020-12-11 1607685317 c3f26b60 old | ||
| 2020-11-24 1606230484 6fdd3d2b old | ||
| 2020-10-28 1603906360 694e118a old | ||
| 2020-10-02 1601624657 bfe1c7dd old | ||
| 2020-09-03 1599135103 c305221a old | ||
| 2020-09-02 1599135103 c305221a old | ||
| 2020-08-31 1598864864 5c41dcec old | ||
| 2020-07-31 1596203019 f8d1dc69 old | ||
| 2020-07-16 1594912546 45291ce6 old | ||
| 2020-07-06 1594036095 2139c00d old | ||
| 2020-06-15 1592228179 c302dea0 old | ||
| 2020-06-12 1591959344 ef583b73 old | ||
| 2020-06-03 1591188827 b5de8c32 old | ||
| 2020-05-28 1590650553 7b40bda4 old | ||
| 2020-05-27 1590601649 d648db39 old | ||
| 2020-05-26 1590496449 8387906e old | ||
| 2020-05-15 1589537152 23a9f59b old | ||
| 2020-04-16 1587057086 a5e1b95f old | ||
| 2020-04-09 1586451341 fffd67bc old | ||
| 2020-03-19 1584628045 940f978d old | ||
| 2020-03-16 1584365318 929eee15 old | ||
| 2020-03-04 1583331848 a445ea4f old | ||
| 2020-01-17 1579282631 5e86aac5 old | ||
| 2020-01-09 1578594354 df0ff18c old | ||
| 2019-12-03 1575394593 f0d7269d old | ||
| 2019-11-18 1574075215 b6a7593d old | ||
| 2019-10-16 1571245203 18472066 old | ||
| 2019-10-08 1570546130 26dd3686 old | ||
| 2019-09-25 1569408005 4d982432 old | ||
| 2019-09-23 1569234286 c67e8bb3 old | ||
| 2019-09-10 1568112110 f626c772 old | ||
| 2019-09-06 1567764559 d8189ed4 old | ||
| 2019-07-15 1563195595 514670a2 old |
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,88 @@ | ||
| # firmware-2712 firmware versions | ||
| # | ||
| # Maps each pieeprom-YYYY-MM-DD.bin to the BUILD_TIMESTAMP | ||
| # and source git hash embedded in the binary, plus the | ||
| # release (default / latest / old) the file lives in. When | ||
| # a binary appears in more than one release the highest- | ||
| # precedence one wins: | ||
| # default > latest > old (old = archived) | ||
| # | ||
| # Generated by tools/update-versions-txt. Sorted newest-first. | ||
| # | ||
| # version build_epoch fw_git_hash release | ||
| 2026-04-27 1777248418 c2a7b9d3 latest | ||
| 2026-04-14 1776201624 9cd61c53 latest | ||
| 2026-02-23 1771840899 85353ce4 latest | ||
| 2026-02-06 1770388300 8124798b latest | ||
| 2026-01-21 1769002727 ab8a9dde latest | ||
| 2026-01-16 1768585427 4aec3e13 latest | ||
| 2025-12-08 1765222194 2226a853 default | ||
| 2025-11-27 1764250826 999d0ec9 old | ||
| 2025-11-21 1763732176 b8803387 old | ||
| 2025-11-05 1762364238 57db150d default | ||
| 2025-10-17 1760694517 b66568da old | ||
| 2025-10-08 1759940358 a06c733f old | ||
| 2025-09-25 1758829114 f6ca7458 old | ||
| 2025-09-23 1758625555 02da46a3 old | ||
| 2025-09-22 1758541389 9652cde4 old | ||
| 2025-08-27 1756321307 000d3ca2 old | ||
| 2025-08-20 1755703318 cd866525 old | ||
| 2025-08-13 1755094299 bb80e517 old | ||
| 2025-07-17 1752769512 a668b6e6 old | ||
| 2025-07-03 1751539154 ab660caa old | ||
| 2025-06-29 1751239011 6672d86c old | ||
| 2025-06-20 1750421313 960432b6 old | ||
| 2025-06-13 1749807566 5855b10b old | ||
| 2025-06-09 1749461452 3a4915a4 old | ||
| 2025-05-08 1746713597 69471177 default | ||
| 2025-04-07 1744067807 50beecf0 old | ||
| 2025-03-27 1743034604 897f94ed old | ||
| 2025-03-19 1742391686 cec1d3ae old | ||
| 2025-03-10 1741626637 2bb2ae64 old | ||
| 2025-03-03 1741014903 9116015f old | ||
| 2025-02-12 1739357512 f788aab6 old | ||
| 2025-02-11 1739293519 75c1e570 old | ||
| 2025-01-27 1737983339 76eda9d7 old | ||
| 2025-01-22 1737505011 a7753063 old | ||
| 2025-01-14 1736813808 0451f142 old | ||
| 2025-01-13 1736727407 fa261b3c old | ||
| 2025-01-08 1736358768 97facbf4 old | ||
| 2025-01-07 1736263931 e10f823b old | ||
| 2025-01-06 1736182835 f49ef7cb old | ||
| 2024-12-19 1734609433 ccf64a4f old | ||
| 2024-12-15 1734221810 461827f2 old | ||
| 2024-12-07 1733575343 3858f977 old | ||
| 2024-11-27 1732717699 0b72471b old | ||
| 2024-11-12 1731427844 4b019946 old | ||
| 2024-11-05 1730810292 3c4fc886 old | ||
| 2024-10-21 1729520869 951e1cc9 old | ||
| 2024-10-10 1728517007 0e63dd5e old | ||
| 2024-09-23 1727096576 26826259 old | ||
| 2024-09-10 1725975630 5be4f304 old | ||
| 2024-09-05 1725562503 7fe8d029 old | ||
| 2024-07-30 1722349546 790da7ef old | ||
| 2024-07-25 1721921872 622dd3d8 old | ||
| 2024-06-05 1717602109 6fe0b091 old | ||
| 2024-06-04 1717489297 503a909a old | ||
| 2024-05-17 1715945383 72caf667 old | ||
| 2024-05-13 1715613301 83b5e5e6 old | ||
| 2024-04-20 1713610410 d1744d21 old | ||
| 2024-04-18 1713429900 86ccc427 old | ||
| 2024-04-17 1713358463 0b7b6f28 old | ||
| 2024-04-05 1712313679 a482d84b old | ||
| 2024-02-16 1708097321 4c845bd3 old | ||
| 2024-02-14 1707895062 c1b99e8d old | ||
| 2024-02-08 1707392087 42e0a50b old | ||
| 2024-02-05 1707143914 0e79493d old | ||
| 2024-01-24 1706098561 1aeae380 old | ||
| 2024-01-22 1705934676 e891ded6 old | ||
| 2024-01-15 1705345348 f0aa0715 old | ||
| 2024-01-05 1704470260 30cc5f37 old | ||
| 2023-12-14 1702572205 0f881224 old | ||
| 2023-12-06 1701887365 e02d33b3 old | ||
| 2023-11-20 1700509217 361205c6 old | ||
| 2023-10-30 1698684310 30de0ba5 old | ||
| 2023-10-18 1697650217 c2da2ae7 old | ||
| 2023-09-28 1695896697 b74d18ae old | ||
| 2023-09-21 1695315523 3094eda5 old | ||
| 2023-09-13 1694601426 9d494316 old |
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,106 @@ | ||
| #!/bin/sh | ||
| # Generate firmware-NNNN/versions.txt mapping the firmware version | ||
| # (date from pieeprom-YYYY-MM-DD.bin) to: | ||
| # - the BUILD_TIMESTAMP embedded in the binary | ||
| # - the source git hash embedded in the binary as "VERSION:<hash>" | ||
| # - the release (default / latest / old) the file lives in. | ||
| # When a binary appears under more than one release the highest- | ||
| # precedence one wins: default > latest > old. | ||
| # Output is sorted newest-first and is whitespace-columnar so that | ||
| # awk can extract fields directly (header lines start with '#'). | ||
|
|
||
| set -eu | ||
|
|
||
| SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) | ||
| REPO_ROOT=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd) | ||
|
|
||
| command -v strings >/dev/null 2>&1 || { | ||
| echo "strings not found. Install binutils." >&2 | ||
| exit 1 | ||
| } | ||
|
|
||
| extract_field() { | ||
| # extract_field <bin> <sed-expression> | ||
| strings "$1" | sed -n "$2" | head -n 1 | ||
| } | ||
|
|
||
| release_for_path() { | ||
| rel="$1" | ||
| case "${rel}" in | ||
| default/*) echo "default" ;; | ||
| latest/*) echo "latest" ;; | ||
| *) echo "old" ;; | ||
| esac | ||
| } | ||
|
|
||
| release_priority() { | ||
| case "$1" in | ||
| default) echo 1 ;; | ||
| latest) echo 2 ;; | ||
| old) echo 3 ;; | ||
| *) echo 9 ;; | ||
| esac | ||
| } | ||
|
|
||
| write_versions_md() { | ||
| family_dir="$1" | ||
| out="${family_dir}/versions.txt" | ||
| family=$(basename "${family_dir}") | ||
| raw=$(mktemp) | ||
| rows=$(mktemp) | ||
|
|
||
| find "${family_dir}" -type f -name 'pieeprom-*.bin' | while read -r bin; do | ||
| name=$(basename "${bin}" .bin) | ||
| version=${name#pieeprom-} | ||
| case "${version}" in | ||
| [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]) ;; | ||
| *) continue ;; | ||
| esac | ||
| rel=${bin#"${family_dir}/"} | ||
| release=$(release_for_path "${rel}") | ||
| priority=$(release_priority "${release}") | ||
| hash=$(extract_field "${bin}" 's/^VERSION://p') | ||
| [ -n "${hash}" ] || hash="(unknown)" | ||
| ts=$(extract_field "${bin}" 's/^BUILD_TIMESTAMP=//p') | ||
| [ -n "${ts}" ] || ts=0 | ||
| printf '%s\t%s\t%s\t%s\t%s\n' \ | ||
| "${version}" "${ts}" "${hash}" "${priority}" "${release}" | ||
| done > "${raw}" | ||
|
|
||
| # Pick the highest-precedence release per (version, hash), then | ||
| # sort newest-first by version (lexicographic on YYYY-MM-DD). | ||
| sort -t ' ' -k1,1 -k3,3 -k4,4n "${raw}" | awk -F '\t' ' | ||
| { key = $1 "\t" $3 } | ||
| !(key in seen) { seen[key] = 1; print } | ||
| ' | sort -t ' ' -k1,1r > "${rows}" | ||
|
|
||
| { | ||
| printf '# %s firmware versions\n' "${family}" | ||
| printf '#\n' | ||
| printf '# Maps each pieeprom-YYYY-MM-DD.bin to the BUILD_TIMESTAMP\n' | ||
| printf '# and source git hash embedded in the binary, plus the\n' | ||
| printf '# release (default / latest / old) the file lives in. When\n' | ||
| printf '# a binary appears in more than one release the highest-\n' | ||
| printf '# precedence one wins:\n' | ||
| printf '# default > latest > old (old = archived)\n' | ||
| printf '#\n' | ||
| printf '# Generated by tools/%s. Sorted newest-first.\n' "$(basename "$0")" | ||
| printf '#\n' | ||
| printf '# %-10s %-10s %-10s %s\n' \ | ||
| "version" "build_epoch" "fw_git_hash" "release" | ||
| while IFS=' ' read -r version ts hash priority release; do | ||
| [ "${ts}" -gt 0 ] 2>/dev/null || ts="-" | ||
| printf '%-10s %-10s %-10s %s\n' \ | ||
| "${version}" "${ts}" "${hash}" "${release}" | ||
| done < "${rows}" | ||
| } > "${out}" | ||
|
|
||
| rm -f "${raw}" "${rows}" | ||
| echo "Wrote ${out}" | ||
| } | ||
|
|
||
| for family in firmware-2711 firmware-2712; do | ||
| dir="${REPO_ROOT}/${family}" | ||
| [ -d "${dir}" ] || continue | ||
| write_versions_md "${dir}" | ||
| done | ||
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.
write_versions_txt? 😉