mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 10:12:50 +00:00
Compare commits
600 Commits
v2.5.4.8d2
...
v2.5.21.44
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
447533aae5 | ||
|
|
1b457bcfbb | ||
|
|
ed07cc067a | ||
|
|
a3a295488c | ||
|
|
5c17afb2ac | ||
|
|
8cacdb65d6 | ||
|
|
3a34f8beaf | ||
|
|
d740934278 | ||
|
|
b370717dcd | ||
|
|
d9534cfc9d | ||
|
|
4c0e0b8471 | ||
|
|
b5cad2b65e | ||
|
|
cd8592ef4a | ||
|
|
78da8f6fc4 | ||
|
|
6a12760c3d | ||
|
|
30a31a3a13 | ||
|
|
2d42e1b2bc | ||
|
|
4747e73f37 | ||
|
|
10d553087c | ||
|
|
7649e70585 | ||
|
|
a14346bc4f | ||
|
|
fd56995764 | ||
|
|
4c97351187 | ||
|
|
3298df953a | ||
|
|
d1f7739bbe | ||
|
|
0d860882a8 | ||
|
|
3b40fe9805 | ||
|
|
8e8b22edb0 | ||
|
|
01892cbd1e | ||
|
|
7fb22cf678 | ||
|
|
fdc87d492c | ||
|
|
0fdbf70452 | ||
|
|
71591fb06a | ||
|
|
9041af365d | ||
|
|
f87c370123 | ||
|
|
c4fcbad372 | ||
|
|
0f981153eb | ||
|
|
c1beb44678 | ||
|
|
973b453d43 | ||
|
|
950341d1f9 | ||
|
|
b353bcc04a | ||
|
|
c4051c1a7b | ||
|
|
2262d77be4 | ||
|
|
9566d6ffd4 | ||
|
|
e466bf2475 | ||
|
|
b0fe5ef8ba | ||
|
|
f132158c3e | ||
|
|
8179e61fdc | ||
|
|
a085614aaa | ||
|
|
7acd72ede1 | ||
|
|
7ba593432e | ||
|
|
a48df91737 | ||
|
|
262f1d25a2 | ||
|
|
4cd2ba5479 | ||
|
|
f9876cfe9c | ||
|
|
85de193845 | ||
|
|
fb2c008c89 | ||
|
|
dd9ab7f0e1 | ||
|
|
729c39fb86 | ||
|
|
038430db23 | ||
|
|
d5cd6f87a0 | ||
|
|
de42d96adf | ||
|
|
e2dd845051 | ||
|
|
6366633cd4 | ||
|
|
1c0f43c8e2 | ||
|
|
89a9e0b99d | ||
|
|
4dc8d6e400 | ||
|
|
e0f97c9306 | ||
|
|
6b1c01ce02 | ||
|
|
70296b47bc | ||
|
|
0cf4a2951a | ||
|
|
124936b6cf | ||
|
|
fd60c9b3be | ||
|
|
a0a4c5bc79 | ||
|
|
0fe8d4ccc7 | ||
|
|
00fdf2c9aa | ||
|
|
253ab458ef | ||
|
|
b4a4d2db4e | ||
|
|
6b8cf164e9 | ||
|
|
812aa35f09 | ||
|
|
e7802d960f | ||
|
|
077ee02426 | ||
|
|
46ea39af45 | ||
|
|
25a5f178e1 | ||
|
|
c144ee77a7 | ||
|
|
b62bdbc46a | ||
|
|
f18a92e8c5 | ||
|
|
2e44de262e | ||
|
|
1d756ae574 | ||
|
|
8aac9f2e8e | ||
|
|
33e5a04508 | ||
|
|
6cf3485d07 | ||
|
|
9421eba027 | ||
|
|
27fbfd03d6 | ||
|
|
353740623f | ||
|
|
cdcbf4c615 | ||
|
|
395469d20a | ||
|
|
86170171a7 | ||
|
|
57766d47a8 | ||
|
|
e5dbcf5bce | ||
|
|
4c3a3ca47d | ||
|
|
78371dfdb7 | ||
|
|
ca32889893 | ||
|
|
35cd600c54 | ||
|
|
70076a4b27 | ||
|
|
f1a8900288 | ||
|
|
16bc89ea57 | ||
|
|
6edf74e8f1 | ||
|
|
7f280dd556 | ||
|
|
2396aa77ca | ||
|
|
d3cbbfd345 | ||
|
|
c003ab0eee | ||
|
|
4fcf7fe027 | ||
|
|
9cc79b1d1e | ||
|
|
403fa15a3f | ||
|
|
b0087fd328 | ||
|
|
fb74e1d182 | ||
|
|
29a7866fc1 | ||
|
|
2f552d15e5 | ||
|
|
892e0922ff | ||
|
|
d21d6c1301 | ||
|
|
031aecac66 | ||
|
|
7c10caa78b | ||
|
|
5196ee39cb | ||
|
|
02a5a91da0 | ||
|
|
b2a89b8136 | ||
|
|
15019e8663 | ||
|
|
35814fd4bc | ||
|
|
6aabbedc00 | ||
|
|
eb72ee0fc1 | ||
|
|
7480378aed | ||
|
|
7c21d7761c | ||
|
|
2c654454cf | ||
|
|
9afadde2f4 | ||
|
|
66a961cb75 | ||
|
|
e1aaafb77a | ||
|
|
9d710041c4 | ||
|
|
b41efc17ba | ||
|
|
9bda080e3d | ||
|
|
9f7cbf1b4f | ||
|
|
93e2bc7058 | ||
|
|
7a1c32b89a | ||
|
|
88d8ab53c8 | ||
|
|
183f68ba00 | ||
|
|
9f32995d7f | ||
|
|
c2c06ed0ad | ||
|
|
9abd07bb05 | ||
|
|
fdcc0e12aa | ||
|
|
8b34c4ff05 | ||
|
|
9af8c58c40 | ||
|
|
58ebd5bcdb | ||
|
|
d1e5be515a | ||
|
|
f9e71c3fb9 | ||
|
|
bfcfca2e46 | ||
|
|
a2a6b236b7 | ||
|
|
3c7053c66a | ||
|
|
e45c0e4d40 | ||
|
|
57a9a5ca21 | ||
|
|
6749367a73 | ||
|
|
a8e2446f00 | ||
|
|
89ebafc8b8 | ||
|
|
43d6b31603 | ||
|
|
31a5b9c122 | ||
|
|
ad726ad684 | ||
|
|
b2808063d0 | ||
|
|
2b33be2fea | ||
|
|
5133117936 | ||
|
|
e5accf4e1d | ||
|
|
26a4d6c87a | ||
|
|
ae93f3fa3f | ||
|
|
ed39d14c85 | ||
|
|
8f8e304216 | ||
|
|
cd198fcf3f | ||
|
|
b1d25ac7b7 | ||
|
|
b12ac6d564 | ||
|
|
33d2f78d21 | ||
|
|
b12aa3f360 | ||
|
|
d87b7e49e4 | ||
|
|
cc357df489 | ||
|
|
1281da627e | ||
|
|
835344074c | ||
|
|
13960874ae | ||
|
|
a7d9e8107a | ||
|
|
fbdd6e7223 | ||
|
|
175ff218f1 | ||
|
|
57af51cc18 | ||
|
|
b4b2fd6122 | ||
|
|
143e1d1a0d | ||
|
|
32719f69c9 | ||
|
|
6a2a4ffa2a | ||
|
|
80fc0f2bda | ||
|
|
fa1a1fd869 | ||
|
|
2fd5a4848a | ||
|
|
f4cff33450 | ||
|
|
1c8b165408 | ||
|
|
8e6ef4ea04 | ||
|
|
fb7866fca7 | ||
|
|
d9b287880f | ||
|
|
f39a9c5083 | ||
|
|
398d29064e | ||
|
|
df63423cdc | ||
|
|
9a10907a2d | ||
|
|
5fed679d33 | ||
|
|
58d80b8557 | ||
|
|
960626e498 | ||
|
|
658459aaf3 | ||
|
|
e1de439a7f | ||
|
|
827553f4c7 | ||
|
|
445c641004 | ||
|
|
7075a05bcd | ||
|
|
63091b7838 | ||
|
|
8c6eec52f2 | ||
|
|
68413486e3 | ||
|
|
af79970ad7 | ||
|
|
4edeca5f84 | ||
|
|
b0e3039732 | ||
|
|
92511ab10b | ||
|
|
b0a4087a0c | ||
|
|
1b2fc00b99 | ||
|
|
69d01a8088 | ||
|
|
09c082fd00 | ||
|
|
020e9102a8 | ||
|
|
2d45afafe5 | ||
|
|
56002155c6 | ||
|
|
547a57256d | ||
|
|
ea72abff22 | ||
|
|
4024bfdeeb | ||
|
|
6d8be13266 | ||
|
|
4a1239f811 | ||
|
|
44cf6d388e | ||
|
|
c3f89a6db8 | ||
|
|
332dbaf573 | ||
|
|
92225eb6c3 | ||
|
|
03770b799f | ||
|
|
1790407078 | ||
|
|
7dd3629501 | ||
|
|
cabeb40c30 | ||
|
|
761a99d241 | ||
|
|
cf46e675ca | ||
|
|
438f627e9b | ||
|
|
0e3dae4fec | ||
|
|
d0e3427ec7 | ||
|
|
f3850ee73b | ||
|
|
3ae85e2c82 | ||
|
|
f81d3b045d | ||
|
|
59ed5c9049 | ||
|
|
4a34bf648f | ||
|
|
b99e57a6fa | ||
|
|
46eab20a90 | ||
|
|
39b5fb041e | ||
|
|
fc16d93421 | ||
|
|
bac9fec17f | ||
|
|
de774188c9 | ||
|
|
c3d60342f4 | ||
|
|
d3e3985e39 | ||
|
|
8eca6a2df8 | ||
|
|
e4f53677fc | ||
|
|
10e10450cf | ||
|
|
f846503cbf | ||
|
|
85b2bad275 | ||
|
|
7ad137b56a | ||
|
|
57ea6a265e | ||
|
|
d00e0f6911 | ||
|
|
594af0cacd | ||
|
|
9f4c8a2804 | ||
|
|
43b8972171 | ||
|
|
fe8e0713cc | ||
|
|
ac6b6c8d83 | ||
|
|
79da2365f0 | ||
|
|
b5777beb7d | ||
|
|
5ad30a55ea | ||
|
|
060a3bde4d | ||
|
|
8df7a035e2 | ||
|
|
b00c05012d | ||
|
|
0832388482 | ||
|
|
601d912c6f | ||
|
|
502a83bb8a | ||
|
|
474f9b5bfb | ||
|
|
fe86c40145 | ||
|
|
09286a3beb | ||
|
|
ae4f54224e | ||
|
|
d5af8f0a97 | ||
|
|
58c957f2c7 | ||
|
|
7c2b6778cb | ||
|
|
0048e3cdcb | ||
|
|
6018c0a830 | ||
|
|
37da78919a | ||
|
|
ad9d7a4972 | ||
|
|
932966b896 | ||
|
|
4d69159e75 | ||
|
|
f2ee0df015 | ||
|
|
fcfb197571 | ||
|
|
dd7140b7a1 | ||
|
|
fadcbd597f | ||
|
|
14b9a1a929 | ||
|
|
c51a7b98bd | ||
|
|
fdec95f9c1 | ||
|
|
e6fb6b115a | ||
|
|
d5bb32ff93 | ||
|
|
f5058a9cbb | ||
|
|
dbc5ec27f7 | ||
|
|
1089469f82 | ||
|
|
fd98e9f553 | ||
|
|
ccfc9e5dd9 | ||
|
|
1752caaf19 | ||
|
|
364dead3aa | ||
|
|
154864dfbf | ||
|
|
2ca3cdf837 | ||
|
|
485c371de4 | ||
|
|
a255da3cf5 | ||
|
|
d65dc497f2 | ||
|
|
c641bfd53c | ||
|
|
b947b123fc | ||
|
|
df1f66a6b9 | ||
|
|
70336f7f4f | ||
|
|
de76caca32 | ||
|
|
89469fcb88 | ||
|
|
a8357ebd52 | ||
|
|
0d1f9e915f | ||
|
|
1a06f88dfb | ||
|
|
a174ec7cf9 | ||
|
|
37b29f6899 | ||
|
|
74d0c58576 | ||
|
|
ca3d8da128 | ||
|
|
be6348388e | ||
|
|
fdc473e5fa | ||
|
|
add70b5229 | ||
|
|
1b99543a15 | ||
|
|
90a3050c1f | ||
|
|
9545a10361 | ||
|
|
d4d89447bd | ||
|
|
81172574a4 | ||
|
|
295278bb12 | ||
|
|
ec6949fdc0 | ||
|
|
f4908fadd6 | ||
|
|
528e177c62 | ||
|
|
73430cb582 | ||
|
|
3a66c738bd | ||
|
|
ea150c32f3 | ||
|
|
ac804818de | ||
|
|
8fcfe7f28b | ||
|
|
e866734a25 | ||
|
|
2ec3958cd8 | ||
|
|
f4b0e19a65 | ||
|
|
a49f080bd2 | ||
|
|
e65a754430 | ||
|
|
a84324c4fa | ||
|
|
ff33a27789 | ||
|
|
51ea7ac627 | ||
|
|
606c2e8eb0 | ||
|
|
762ccdc1b9 | ||
|
|
0acccdfe2d | ||
|
|
0e4f7003c7 | ||
|
|
40bc04b521 | ||
|
|
eb8d38a7e9 | ||
|
|
3d5eb34c5c | ||
|
|
3a9a4bbb92 | ||
|
|
6eba2789d0 | ||
|
|
9b4c260a92 | ||
|
|
667b4ef0f2 | ||
|
|
db76561930 | ||
|
|
7bad070891 | ||
|
|
6365fcfdc6 | ||
|
|
ab2cbada75 | ||
|
|
875b8641d3 | ||
|
|
67c2c516a0 | ||
|
|
623203ca3b | ||
|
|
f28f0a9d90 | ||
|
|
893efe4f11 | ||
|
|
2c2213ef9b | ||
|
|
439c1dec08 | ||
|
|
aa184e6d8b | ||
|
|
2eea412f1c | ||
|
|
b0a5a26f58 | ||
|
|
a815a770b4 | ||
|
|
286f3c6458 | ||
|
|
b506f6dcb0 | ||
|
|
bd3755bb33 | ||
|
|
73e2e25eb1 | ||
|
|
3bd3911913 | ||
|
|
982190936d | ||
|
|
8498b175e7 | ||
|
|
255713d23d | ||
|
|
8e2a3e5728 | ||
|
|
f769c50fa5 | ||
|
|
7ba6d97e99 | ||
|
|
f3b698905d | ||
|
|
50dac38a1b | ||
|
|
bf944e78d8 | ||
|
|
e71be778dd | ||
|
|
276067065e | ||
|
|
a628c93125 | ||
|
|
03aaaafa13 | ||
|
|
0a82fd28b3 | ||
|
|
89c186e662 | ||
|
|
8c99f913c1 | ||
|
|
d00acc5d7b | ||
|
|
9415254dda | ||
|
|
448c754882 | ||
|
|
da7424a604 | ||
|
|
1bec23b6bb | ||
|
|
bee474ee54 | ||
|
|
93bc61c855 | ||
|
|
0fc5c9b0d7 | ||
|
|
b0c924f185 | ||
|
|
8801bc5ce9 | ||
|
|
cf476eb87c | ||
|
|
ba2f25293b | ||
|
|
2d4d36c605 | ||
|
|
cbe74009a9 | ||
|
|
701421b50a | ||
|
|
336cdc0efe | ||
|
|
a1ac358b0a | ||
|
|
8462d65f76 | ||
|
|
10dd8af614 | ||
|
|
9c06c492d9 | ||
|
|
7e3c369e87 | ||
|
|
732cf4832a | ||
|
|
545ebf9b17 | ||
|
|
7912c214c7 | ||
|
|
600208ab0b | ||
|
|
462a0718cf | ||
|
|
aae346aef7 | ||
|
|
28b469dbf0 | ||
|
|
5f6e19d971 | ||
|
|
0726eaa678 | ||
|
|
50fb575caa | ||
|
|
cc59a50cba | ||
|
|
b3ba23b4e8 | ||
|
|
936260fca3 | ||
|
|
2945b9cfbe | ||
|
|
ed03d28a83 | ||
|
|
850f61d2d0 | ||
|
|
e12fd27b49 | ||
|
|
77dfc92f1e | ||
|
|
c4eb9a6d7f | ||
|
|
195f109ef7 | ||
|
|
3c8ca39eff | ||
|
|
c071eed6a3 | ||
|
|
d14d42ba2c | ||
|
|
82145e0661 | ||
|
|
1334d07c6a | ||
|
|
bf760a44ba | ||
|
|
94ff67e927 | ||
|
|
e37369a25f | ||
|
|
a8bd1ee0da | ||
|
|
2568d4fcd8 | ||
|
|
adf1bc4b0e | ||
|
|
ea63f035d1 | ||
|
|
e394bc6f8f | ||
|
|
a0e468b16e | ||
|
|
93318b4f56 | ||
|
|
0c0da3909f | ||
|
|
701293c2d3 | ||
|
|
6485f037ec | ||
|
|
ca5f71f774 | ||
|
|
57667f1028 | ||
|
|
3f1c86f953 | ||
|
|
4416ac57cf | ||
|
|
a4705d2c19 | ||
|
|
5ff8c904c8 | ||
|
|
09c8642aa6 | ||
|
|
82bcd503a3 | ||
|
|
18ca5b4449 | ||
|
|
2ba72c154a | ||
|
|
7e3931b05d | ||
|
|
4575352d8c | ||
|
|
b1b6bce6b7 | ||
|
|
304f26b909 | ||
|
|
a27f9fcdbd | ||
|
|
dfeb33d46e | ||
|
|
b8b6894d58 | ||
|
|
934be69663 | ||
|
|
ec9e562a77 | ||
|
|
fbb6778415 | ||
|
|
2ea2b47690 | ||
|
|
f77c87dca8 | ||
|
|
198b62f3fc | ||
|
|
3e5f129fce | ||
|
|
ad214ea42a | ||
|
|
25b557cf46 | ||
|
|
7fd1c334d3 | ||
|
|
696bcc60af | ||
|
|
af0db8a29f | ||
|
|
ea20bb1836 | ||
|
|
420ab89f8d | ||
|
|
1212969ff7 | ||
|
|
e49e584ae1 | ||
|
|
89c1e041e1 | ||
|
|
655e58f424 | ||
|
|
0ec1684718 | ||
|
|
05e4a639a1 | ||
|
|
fb9f361052 | ||
|
|
37448205b5 | ||
|
|
015f7335b0 | ||
|
|
48d8b85a3b | ||
|
|
363fd8ab98 | ||
|
|
323e7503ea | ||
|
|
4e4431560e | ||
|
|
a8c216f4f8 | ||
|
|
9d0729c83f | ||
|
|
3c89716074 | ||
|
|
ec96256bcd | ||
|
|
1f2d972e18 | ||
|
|
cc87002a8a | ||
|
|
8ab772221d | ||
|
|
d55c08d5cd | ||
|
|
e8f287a36f | ||
|
|
b769799410 | ||
|
|
f5f9fd54a1 | ||
|
|
f82585d9b0 | ||
|
|
1b04d41b9a | ||
|
|
3b21856a76 | ||
|
|
519ca9c0aa | ||
|
|
23a52ee625 | ||
|
|
7ff4bafe22 | ||
|
|
149620f071 | ||
|
|
0cbade989e | ||
|
|
411834afba | ||
|
|
1096973828 | ||
|
|
dc9aa6aff7 | ||
|
|
ad8747d914 | ||
|
|
ddd4a45bc3 | ||
|
|
4f8f96ab29 | ||
|
|
ee5091fee5 | ||
|
|
876993f095 | ||
|
|
a05b009379 | ||
|
|
5db4918413 | ||
|
|
a0dd7b43d5 | ||
|
|
b1f045cab8 | ||
|
|
2e5399dbe4 | ||
|
|
d005b1e49c | ||
|
|
9d9258a59b | ||
|
|
37f294d0a6 | ||
|
|
411aedaf5d | ||
|
|
1c54388bb8 | ||
|
|
94ecbad904 | ||
|
|
53f189fff4 | ||
|
|
93d874b013 | ||
|
|
234a56446b | ||
|
|
830281803f | ||
|
|
bb9f003c24 | ||
|
|
001a845ac3 | ||
|
|
7febb41727 | ||
|
|
ad031dd69f | ||
|
|
ebc3a66d10 | ||
|
|
553e572eb5 | ||
|
|
01df3ff477 | ||
|
|
a3a97d3025 | ||
|
|
0952d1b252 | ||
|
|
8a370c5381 | ||
|
|
a6f96cb9b4 | ||
|
|
d650001caa | ||
|
|
0c90a2274f | ||
|
|
dac433ed2f | ||
|
|
8acc9ccf5f | ||
|
|
243421b2a5 | ||
|
|
6d6ed55ed7 | ||
|
|
783466f116 | ||
|
|
55049ed547 | ||
|
|
e182ae75c2 | ||
|
|
7e946d15ca | ||
|
|
c3b9d493b6 | ||
|
|
4db0c75c8e | ||
|
|
e7cfadacd8 | ||
|
|
673fe294f3 | ||
|
|
236374491b | ||
|
|
d6f26c682d | ||
|
|
befc2ece6f | ||
|
|
b2b60eccdb | ||
|
|
07d4e6f5be | ||
|
|
0a93261c06 | ||
|
|
00f15459ec | ||
|
|
b8044c4983 | ||
|
|
18f12584ab | ||
|
|
e1e7bbc420 | ||
|
|
5f974d2961 | ||
|
|
cae2e43dc6 | ||
|
|
0d175a918c | ||
|
|
3440c640c3 | ||
|
|
b769d9f854 | ||
|
|
e6e05dda1e | ||
|
|
82f1be33aa | ||
|
|
db4a793aa9 | ||
|
|
b39aca8d11 | ||
|
|
6c327d960d | ||
|
|
cd480846e9 | ||
|
|
9f3a1c1214 | ||
|
|
c4c85777d0 | ||
|
|
ca8d2204ba | ||
|
|
a388e78842 | ||
|
|
35cdc81d45 | ||
|
|
0c42f79038 | ||
|
|
4fc3782ea3 | ||
|
|
9ac4a0114f | ||
|
|
9188786581 | ||
|
|
b2417f651a | ||
|
|
d02ba45109 | ||
|
|
c6bffd7d7f | ||
|
|
a5b79528b3 |
52
.clusterfuzzlite/Dockerfile
Normal file
52
.clusterfuzzlite/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# This container is used to build Meshtastic with the libraries required by the fuzzer.
|
||||||
|
# ClusterFuzzLite starts the container, runs the build.sh script, and then exits.
|
||||||
|
|
||||||
|
# As this is not a long running service, health-checks are not required. ClusterFuzzLite
|
||||||
|
# also only works if the user remains unchanged from the base image (it expects to run
|
||||||
|
# as root).
|
||||||
|
# trunk-ignore-all(trivy/DS026): No healthcheck is needed for this builder container
|
||||||
|
# trunk-ignore-all(checkov/CKV_DOCKER_2): No healthcheck is needed for this builder container
|
||||||
|
# trunk-ignore-all(checkov/CKV_DOCKER_3): We must run as root for this container
|
||||||
|
# trunk-ignore-all(trivy/DS002): We must run as root for this container
|
||||||
|
# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container
|
||||||
|
# trunk-ignore-all(hadolint/DL3002): We must run as root for this container
|
||||||
|
|
||||||
|
FROM gcr.io/oss-fuzz-base/base-builder:v1
|
||||||
|
|
||||||
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
|
|
||||||
|
# trunk-ignore(hadolint/DL3008): apt packages are not pinned.
|
||||||
|
# trunk-ignore(terrascan/AC_DOCKER_0002): apt packages are not pinned.
|
||||||
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
|
cmake git zip libgpiod-dev libbluetooth-dev libi2c-dev \
|
||||||
|
libunistring-dev libmicrohttpd-dev libgnutls28-dev libgcrypt20-dev \
|
||||||
|
libusb-1.0-0-dev libssl-dev pkg-config && \
|
||||||
|
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
|
pip install --no-cache-dir -U \
|
||||||
|
platformio==6.1.16 \
|
||||||
|
grpcio-tools==1.68.1 \
|
||||||
|
meshtastic==2.5.9
|
||||||
|
|
||||||
|
# Ugly hack to avoid clang detecting a conflict between the math "log" function and the "log" function in framework-portduino/cores/portduino/logging.h
|
||||||
|
RUN sed -i -e 's/__MATHCALL_VEC (log,, (_Mdouble_ __x));//' /usr/include/x86_64-linux-gnu/bits/mathcalls.h
|
||||||
|
|
||||||
|
# A few dependencies are too old on the base-builder image. More recent versions are built from source.
|
||||||
|
WORKDIR $SRC
|
||||||
|
RUN git config --global advice.detachedHead false && \
|
||||||
|
git clone --depth 1 --branch 0.8.0 https://github.com/jbeder/yaml-cpp.git && \
|
||||||
|
git clone --depth 1 --branch v2.3.3 https://github.com/babelouest/orcania.git && \
|
||||||
|
git clone --depth 1 --branch v1.4.20 https://github.com/babelouest/yder.git && \
|
||||||
|
git clone --depth 1 --branch v2.7.15 https://github.com/babelouest/ulfius.git
|
||||||
|
|
||||||
|
COPY ./.clusterfuzzlite/build.sh $SRC/
|
||||||
|
|
||||||
|
WORKDIR $SRC/firmware
|
||||||
|
COPY . $SRC/firmware/
|
||||||
|
|
||||||
|
# https://docs.platformio.org/en/latest/envvars.html
|
||||||
|
ENV PLATFORMIO_CORE_DIR=$SRC/pio/core \
|
||||||
|
PLATFORMIO_LIBDEPS_DIR=$SRC/pio/libdeps \
|
||||||
|
PLATFORMIO_PACKAGES_DIR=$SRC/pio/packages \
|
||||||
|
PLATFORMIO_SETTING_ENABLE_CACHE=No \
|
||||||
|
PIO_ENV=buildroot
|
||||||
|
RUN platformio pkg install --environment $PIO_ENV
|
||||||
59
.clusterfuzzlite/README.md
Normal file
59
.clusterfuzzlite/README.md
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# ClusterFuzzLite for Meshtastic
|
||||||
|
|
||||||
|
This directory contains the fuzzer implementation for Meshtastic using the ClusterFuzzLite framework.
|
||||||
|
See the [ClusterFuzzLite documentation](https://google.github.io/clusterfuzzlite/) for more details.
|
||||||
|
|
||||||
|
## Running locally
|
||||||
|
|
||||||
|
ClusterFuzzLite uses the OSS-Fuzz toolchain. To build the fuzzer manually, first grab a copy of OSS-Fuzz.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/google/oss-fuzz.git
|
||||||
|
cd oss-fuzz
|
||||||
|
```
|
||||||
|
|
||||||
|
To build the fuzzer, run:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python3 infra/helper.py build_image --external $PATH_TO_MESHTASTIC_FIRMWARE_DIRECTORY
|
||||||
|
python3 infra/helper.py build_fuzzers --external $PATH_TO_MESHTASTIC_FIRMWARE_DIRECTORY --sanitizer address
|
||||||
|
```
|
||||||
|
|
||||||
|
To run the fuzzer, run:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python3 infra/helper.py run_fuzzer --external --corpus-dir=<path-to-temp-corpus-dir> $PATH_TO_MESHTASTIC_FIRMWARE_DIRECTORY router_fuzzer
|
||||||
|
```
|
||||||
|
|
||||||
|
More background on these commands can be found in the
|
||||||
|
[ClusterFuzzLite documentation](https://google.github.io/clusterfuzzlite/build-integration/#testing-locally).
|
||||||
|
|
||||||
|
## router_fuzzer.cpp
|
||||||
|
|
||||||
|
This fuzzer submits MeshPacket protos to the `Router::enqueueReceivedMessage` method. It takes the binary
|
||||||
|
data from the fuzzer and decodes that data to a MeshPacket using nanopb. A few fields in
|
||||||
|
the MeshPacket are modified by the fuzzer.
|
||||||
|
|
||||||
|
- If the `to` field is 0, it will be replaced with the NodeID of the running node.
|
||||||
|
- If the `from` field is 0, it will be replaced with the NodeID of the running node.
|
||||||
|
- If the `id` field is 0, it will be replaced with an incrementing counter value.
|
||||||
|
- If the `pki_encrypted` field is true, the `public_key` field will be populated with the first admin key.
|
||||||
|
|
||||||
|
The `router_fuzzer_seed_corpus.py` file contains a list of MeshPackets. It is run from inside build.sh and
|
||||||
|
writes the binary MeshPacket protos to files. These files are use used by the fuzzer as its initial seed data,
|
||||||
|
helping the fuzzer to start off with a few known inputs.
|
||||||
|
|
||||||
|
### Interpreting a fuzzer crash
|
||||||
|
|
||||||
|
If the fuzzer crashes, it'll write the input bytes used for the test case to a file and notify about the
|
||||||
|
location of that file. The contents of the file are a binary serialized MeshPacket protobuf. The following
|
||||||
|
snippet of Python code can be used to parse the file into a human readable form.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from meshtastic.protobuf import mesh_pb2
|
||||||
|
|
||||||
|
mesh_pb2.MeshPacket.FromString(open("crash-XXXX-file", "rb").read())
|
||||||
|
```
|
||||||
|
|
||||||
|
Consider adding any such crash results to the `router_fuzzer_seed_corpus.py` file to ensure there a isn't
|
||||||
|
a future regression for that crash test case.
|
||||||
71
.clusterfuzzlite/build.sh
Normal file
71
.clusterfuzzlite/build.sh
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/bash -eu
|
||||||
|
|
||||||
|
# Build Meshtastic and a few needed dependencies using clang++
|
||||||
|
# and the OSS-Fuzz required build flags.
|
||||||
|
|
||||||
|
env
|
||||||
|
|
||||||
|
cd "$SRC"
|
||||||
|
NPROC=$(nproc || echo 1)
|
||||||
|
|
||||||
|
LDFLAGS=-lpthread cmake -S "$SRC/yaml-cpp" -B "$WORK/yaml-cpp/$SANITIZER" \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
|
cmake --build "$WORK/yaml-cpp/$SANITIZER" -j "$NPROC"
|
||||||
|
cmake --install "$WORK/yaml-cpp/$SANITIZER" --prefix /usr
|
||||||
|
|
||||||
|
cmake -S "$SRC/orcania" -B "$WORK/orcania/$SANITIZER" \
|
||||||
|
-DBUILD_STATIC=ON
|
||||||
|
cmake --build "$WORK/orcania/$SANITIZER" -j "$NPROC"
|
||||||
|
cmake --install "$WORK/orcania/$SANITIZER" --prefix /usr
|
||||||
|
|
||||||
|
cmake -S "$SRC/yder" -B "$WORK/yder/$SANITIZER" \
|
||||||
|
-DBUILD_STATIC=ON -DWITH_JOURNALD=OFF
|
||||||
|
cmake --build "$WORK/yder/$SANITIZER" -j "$NPROC"
|
||||||
|
cmake --install "$WORK/yder/$SANITIZER" --prefix /usr
|
||||||
|
|
||||||
|
cmake -S "$SRC/ulfius" -B "$WORK/ulfius/$SANITIZER" \
|
||||||
|
-DBUILD_STATIC=ON -DWITH_JANSSON=OFF -DWITH_CURL=OFF -DWITH_WEBSOCKET=OFF
|
||||||
|
cmake --build "$WORK/ulfius/$SANITIZER" -j "$NPROC"
|
||||||
|
cmake --install "$WORK/ulfius/$SANITIZER" --prefix /usr
|
||||||
|
|
||||||
|
cd "$SRC/firmware"
|
||||||
|
|
||||||
|
PLATFORMIO_EXTRA_SCRIPTS=$(echo -e "pre:.clusterfuzzlite/platformio-clusterfuzzlite-pre.py\npost:.clusterfuzzlite/platformio-clusterfuzzlite-post.py")
|
||||||
|
STATIC_LIBS=$(pkg-config --libs --static libulfius openssl libgpiod yaml-cpp bluez --silence-errors)
|
||||||
|
export PLATFORMIO_EXTRA_SCRIPTS
|
||||||
|
export STATIC_LIBS
|
||||||
|
export PLATFORMIO_WORKSPACE_DIR="$WORK/pio/$SANITIZER"
|
||||||
|
export TARGET_CC=$CC
|
||||||
|
export TARGET_CXX=$CXX
|
||||||
|
export TARGET_LD=$CXX
|
||||||
|
export TARGET_AR=llvm-ar
|
||||||
|
export TARGET_AS=llvm-as
|
||||||
|
export TARGET_OBJCOPY=llvm-objcopy
|
||||||
|
export TARGET_RANLIB=llvm-ranlib
|
||||||
|
|
||||||
|
mkdir -p "$OUT/lib"
|
||||||
|
|
||||||
|
cp .clusterfuzzlite/*_fuzzer.options "$OUT/"
|
||||||
|
|
||||||
|
for f in .clusterfuzzlite/*_fuzzer.cpp; do
|
||||||
|
fuzzer=$(basename "$f" .cpp)
|
||||||
|
cp -f "$f" src/fuzzer.cpp
|
||||||
|
pio run -vvv --environment "$PIO_ENV"
|
||||||
|
program="$PLATFORMIO_WORKSPACE_DIR/build/$PIO_ENV/program"
|
||||||
|
cp "$program" "$OUT/$fuzzer"
|
||||||
|
|
||||||
|
# Copy shared libraries used by the fuzzer.
|
||||||
|
read -d '' -ra shared_libs < <(ldd "$program" | sed -n 's/[^=]\+=> \([^ ]\+\).*/\1/p') || true
|
||||||
|
cp -f "${shared_libs[@]}" "$OUT/lib/"
|
||||||
|
|
||||||
|
# Build the initial fuzzer seed corpus.
|
||||||
|
corpus_name="${fuzzer}_seed_corpus"
|
||||||
|
corpus_generator="$PWD/.clusterfuzzlite/${corpus_name}.py"
|
||||||
|
if [[ -f $corpus_generator ]]; then
|
||||||
|
mkdir "$corpus_name"
|
||||||
|
pushd "$corpus_name"
|
||||||
|
python3 "$corpus_generator"
|
||||||
|
popd
|
||||||
|
zip -D "$OUT/${corpus_name}.zip" "$corpus_name"/*
|
||||||
|
fi
|
||||||
|
done
|
||||||
35
.clusterfuzzlite/platformio-clusterfuzzlite-post.py
Normal file
35
.clusterfuzzlite/platformio-clusterfuzzlite-post.py
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
"""PlatformIO build script (post: runs after other Meshtastic scripts)."""
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shlex
|
||||||
|
|
||||||
|
from SCons.Script import DefaultEnvironment
|
||||||
|
|
||||||
|
env = DefaultEnvironment()
|
||||||
|
|
||||||
|
# Remove any static libraries from the LIBS environment. Static libraries are
|
||||||
|
# handled in platformio-clusterfuzzlite-pre.py.
|
||||||
|
static_libs = set(lib[2:] for lib in shlex.split(os.getenv("STATIC_LIBS")))
|
||||||
|
env.Replace(
|
||||||
|
LIBS=[
|
||||||
|
lib for lib in env["LIBS"] if not (isinstance(lib, str) and lib in static_libs)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# FrameworkArduino/portduino/main.cpp contains the "main" function the binary.
|
||||||
|
# The fuzzing framework also provides a "main" function and needs to be run
|
||||||
|
# before Meshtastic is started. We rename the "main" function for Meshtastic to
|
||||||
|
# "portduino_main" here so that it can be called inside the fuzzer.
|
||||||
|
env.AddPostAction(
|
||||||
|
"$BUILD_DIR/FrameworkArduino/portduino/main.cpp.o",
|
||||||
|
env.VerboseAction(
|
||||||
|
" ".join(
|
||||||
|
[
|
||||||
|
"$OBJCOPY",
|
||||||
|
"--redefine-sym=main=portduino_main",
|
||||||
|
"$BUILD_DIR/FrameworkArduino/portduino/main.cpp.o",
|
||||||
|
]
|
||||||
|
),
|
||||||
|
"Renaming main symbol to portduino_main",
|
||||||
|
),
|
||||||
|
)
|
||||||
52
.clusterfuzzlite/platformio-clusterfuzzlite-pre.py
Normal file
52
.clusterfuzzlite/platformio-clusterfuzzlite-pre.py
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
"""PlatformIO build script (pre: runs before other Meshtastic scripts).
|
||||||
|
|
||||||
|
ClusterFuzzLite executes in a different container from the build. During the build,
|
||||||
|
attempt to link statically to as many dependencies as possible. For dependencies that
|
||||||
|
do not have static libraries, the shared library files are copied to the output
|
||||||
|
directory by the build.sh script.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
import shlex
|
||||||
|
|
||||||
|
from SCons.Script import DefaultEnvironment, Literal
|
||||||
|
|
||||||
|
env = DefaultEnvironment()
|
||||||
|
|
||||||
|
cxxflags = shlex.split(os.getenv("CXXFLAGS"))
|
||||||
|
sanitizer_flags = shlex.split(os.getenv("SANITIZER_FLAGS"))
|
||||||
|
lib_fuzzing_engine = shlex.split(os.getenv("LIB_FUZZING_ENGINE"))
|
||||||
|
statics = glob.glob("/usr/lib/lib*.a") + glob.glob("/usr/lib/*/lib*.a")
|
||||||
|
no_static = set(("-ldl",))
|
||||||
|
|
||||||
|
|
||||||
|
def replaceStatic(lib):
|
||||||
|
"""Replace -l<libname> with the static .a file for the library."""
|
||||||
|
if not lib.startswith("-l") or lib in no_static:
|
||||||
|
return lib
|
||||||
|
static_name = f"/lib{lib[2:]}.a"
|
||||||
|
static = [s for s in statics if s.endswith(static_name)]
|
||||||
|
if len(static) == 1:
|
||||||
|
return static[0]
|
||||||
|
return lib
|
||||||
|
|
||||||
|
|
||||||
|
# Setup the environment for building with Clang and the OSS-Fuzz required build flags.
|
||||||
|
env.Append(
|
||||||
|
CFLAGS=os.getenv("CFLAGS"),
|
||||||
|
CXXFLAGS=cxxflags,
|
||||||
|
LIBSOURCE_DIRS=["/usr/lib/x86_64-linux-gnu"],
|
||||||
|
LINKFLAGS=cxxflags
|
||||||
|
+ sanitizer_flags
|
||||||
|
+ lib_fuzzing_engine
|
||||||
|
+ ["-stdlib=libc++", "-std=c++17"],
|
||||||
|
_LIBFLAGS=[replaceStatic(s) for s in shlex.split(os.getenv("STATIC_LIBS"))]
|
||||||
|
+ [
|
||||||
|
"/usr/lib/x86_64-linux-gnu/libunistring.a", # Needs to be at the end.
|
||||||
|
# Find the shared libraries in a subdirectory named lib
|
||||||
|
# within the same directory as the binary.
|
||||||
|
Literal("-Wl,-rpath,$ORIGIN/lib"),
|
||||||
|
"-Wl,-z,origin",
|
||||||
|
],
|
||||||
|
)
|
||||||
1
.clusterfuzzlite/project.yaml
Normal file
1
.clusterfuzzlite/project.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
language: c++
|
||||||
206
.clusterfuzzlite/router_fuzzer.cpp
Normal file
206
.clusterfuzzlite/router_fuzzer.cpp
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
// Fuzzer implementation that sends MeshPackets to Router::enqueueReceivedMessage.
|
||||||
|
#include <condition_variable>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <mutex>
|
||||||
|
#include <pb_decode.h>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
#include "PortduinoGPIO.h"
|
||||||
|
#include "PortduinoGlue.h"
|
||||||
|
#include "PowerFSM.h"
|
||||||
|
#include "mesh/MeshTypes.h"
|
||||||
|
#include "mesh/NodeDB.h"
|
||||||
|
#include "mesh/Router.h"
|
||||||
|
#include "mesh/TypeConversions.h"
|
||||||
|
#include "mesh/mesh-pb-constants.h"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
constexpr uint32_t nodeId = 0x12345678;
|
||||||
|
// Set to true when lateInitVariant finishes. Used to ensure lateInitVariant was called during startup.
|
||||||
|
bool hasBeenConfigured = false;
|
||||||
|
|
||||||
|
// These are used to block the Arduino loop() function until a fuzzer input is ready. This is
|
||||||
|
// an optimization that prevents a sleep from happening before the loop is run. The Arduino loop
|
||||||
|
// function calls loopCanSleep() before sleeping. loopCanSleep is implemented here in the fuzzer
|
||||||
|
// and blocks until runLoopOnce() is called to signal for the loop to run.
|
||||||
|
bool fuzzerRunning = false; // Set to true once LLVMFuzzerTestOneInput has started running.
|
||||||
|
bool loopCanRun = true; // The main Arduino loop() can run when this is true.
|
||||||
|
bool loopIsWaiting = false; // The main Arduino loop() is waiting to be signaled to run.
|
||||||
|
bool loopShouldExit = false; // Indicates that the main Arduino thread should exit by throwing ShouldExitException.
|
||||||
|
std::mutex loopLock;
|
||||||
|
std::condition_variable loopCV;
|
||||||
|
std::thread meshtasticThread;
|
||||||
|
|
||||||
|
// This exception is thrown when the portuino main thread should exit.
|
||||||
|
class ShouldExitException : public std::runtime_error
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
using std::runtime_error::runtime_error;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Start the loop for one test case and wait till the loop has completed. This ensures fuzz
|
||||||
|
// test cases do not overlap with one another. This helps the fuzzer attribute a crash to the
|
||||||
|
// single, currently running, test case.
|
||||||
|
void runLoopOnce()
|
||||||
|
{
|
||||||
|
realHardware = true; // Avoids delay(100) within portduino/main.cpp
|
||||||
|
std::unique_lock<std::mutex> lck(loopLock);
|
||||||
|
fuzzerRunning = true;
|
||||||
|
loopCanRun = true;
|
||||||
|
loopCV.notify_one();
|
||||||
|
loopCV.wait(lck, [] { return !loopCanRun && loopIsWaiting; });
|
||||||
|
}
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
// Called in the main Arduino loop function to determine if the loop can delay/sleep before running again.
|
||||||
|
// We use this as a way to block the loop from sleeping and to start the loop function immediately when a
|
||||||
|
// fuzzer input is ready.
|
||||||
|
bool loopCanSleep()
|
||||||
|
{
|
||||||
|
std::unique_lock<std::mutex> lck(loopLock);
|
||||||
|
loopIsWaiting = true;
|
||||||
|
loopCV.notify_one();
|
||||||
|
loopCV.wait(lck, [] { return loopCanRun || loopShouldExit; });
|
||||||
|
loopIsWaiting = false;
|
||||||
|
if (loopShouldExit)
|
||||||
|
throw ShouldExitException("exit");
|
||||||
|
if (!fuzzerRunning)
|
||||||
|
return true; // The loop can sleep before the fuzzer starts.
|
||||||
|
loopCanRun = false; // Only run the loop once before waiting again.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called just prior to starting Meshtastic. Allows for setting config values before startup.
|
||||||
|
void lateInitVariant()
|
||||||
|
{
|
||||||
|
settingsMap[logoutputlevel] = level_error;
|
||||||
|
channelFile.channels[0] = meshtastic_Channel{
|
||||||
|
.has_settings = true,
|
||||||
|
.settings =
|
||||||
|
meshtastic_ChannelSettings{
|
||||||
|
.psk = {.size = 1, .bytes = {/*defaultpskIndex=*/1}},
|
||||||
|
.name = "LongFast",
|
||||||
|
.uplink_enabled = true,
|
||||||
|
.has_module_settings = true,
|
||||||
|
.module_settings = {.position_precision = 16},
|
||||||
|
},
|
||||||
|
.role = meshtastic_Channel_Role_PRIMARY,
|
||||||
|
};
|
||||||
|
config.security.admin_key[0] = {
|
||||||
|
.size = 32,
|
||||||
|
.bytes = {0xcd, 0xc0, 0xb4, 0x3c, 0x53, 0x24, 0xdf, 0x13, 0xca, 0x5a, 0xa6, 0x0c, 0x0d, 0xec, 0x85, 0x5a,
|
||||||
|
0x4c, 0xf6, 0x1a, 0x96, 0x04, 0x1a, 0x3e, 0xfc, 0xbb, 0x8e, 0x33, 0x71, 0xe5, 0xfc, 0xff, 0x3c},
|
||||||
|
};
|
||||||
|
config.security.admin_key_count = 1;
|
||||||
|
config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_US;
|
||||||
|
moduleConfig.has_mqtt = true;
|
||||||
|
moduleConfig.mqtt = meshtastic_ModuleConfig_MQTTConfig{
|
||||||
|
.enabled = true,
|
||||||
|
.proxy_to_client_enabled = true,
|
||||||
|
};
|
||||||
|
moduleConfig.has_store_forward = true;
|
||||||
|
moduleConfig.store_forward = meshtastic_ModuleConfig_StoreForwardConfig{
|
||||||
|
.enabled = true,
|
||||||
|
.history_return_max = 4,
|
||||||
|
.history_return_window = 600,
|
||||||
|
.is_server = true,
|
||||||
|
};
|
||||||
|
meshtastic_Position fixedGPS = meshtastic_Position{
|
||||||
|
.has_latitude_i = true,
|
||||||
|
.latitude_i = static_cast<uint32_t>(1 * 1e7),
|
||||||
|
.has_longitude_i = true,
|
||||||
|
.longitude_i = static_cast<uint32_t>(3 * 1e7),
|
||||||
|
.has_altitude = true,
|
||||||
|
.altitude = 64,
|
||||||
|
.location_source = meshtastic_Position_LocSource_LOC_MANUAL,
|
||||||
|
};
|
||||||
|
nodeDB->setLocalPosition(fixedGPS);
|
||||||
|
config.has_position = true;
|
||||||
|
config.position.fixed_position = true;
|
||||||
|
meshtastic_NodeInfoLite *info = nodeDB->getMeshNode(nodeDB->getNodeNum());
|
||||||
|
info->has_position = true;
|
||||||
|
info->position = TypeConversions::ConvertToPositionLite(fixedGPS);
|
||||||
|
hasBeenConfigured = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
int portduino_main(int argc, char **argv); // Renamed "main" function from Meshtastic binary.
|
||||||
|
|
||||||
|
// Start Meshtastic in a thread and wait till it has reached the ON state.
|
||||||
|
int LLVMFuzzerInitialize(int *argc, char ***argv)
|
||||||
|
{
|
||||||
|
settingsMap[maxtophone] = 5;
|
||||||
|
|
||||||
|
meshtasticThread = std::thread([program = *argv[0]]() {
|
||||||
|
char nodeIdStr[12];
|
||||||
|
strcpy(nodeIdStr, std::to_string(nodeId).c_str());
|
||||||
|
int argc = 7;
|
||||||
|
char *argv[] = {program, "-d", "/tmp/meshtastic", "-h", nodeIdStr, "-p", "0", nullptr};
|
||||||
|
try {
|
||||||
|
portduino_main(argc, argv);
|
||||||
|
} catch (const ShouldExitException &) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
std::atexit([] {
|
||||||
|
{
|
||||||
|
const std::lock_guard<std::mutex> lck(loopLock);
|
||||||
|
loopShouldExit = true;
|
||||||
|
loopCV.notify_one();
|
||||||
|
}
|
||||||
|
meshtasticThread.join();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Wait for startup.
|
||||||
|
for (int i = 1; i < 20; ++i) {
|
||||||
|
if (powerFSM.getState() == &stateON) {
|
||||||
|
assert(hasBeenConfigured);
|
||||||
|
assert(router);
|
||||||
|
assert(nodeDB);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is the main entrypoint for the fuzzer (the fuzz target). The fuzzer will provide an array of bytes to be
|
||||||
|
// interpreted by this method. To keep things simple, the bytes are interpreted as a binary serialized MeshPacket
|
||||||
|
// proto. Any crashes discovered by the fuzzer will be written to a file. Unserialize that file to print the MeshPacket
|
||||||
|
// that caused the failure.
|
||||||
|
//
|
||||||
|
// This guide provides best practices for writing a fuzzer target.
|
||||||
|
// https://github.com/google/fuzzing/blob/master/docs/good-fuzz-target.md
|
||||||
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t length)
|
||||||
|
{
|
||||||
|
meshtastic_MeshPacket p = meshtastic_MeshPacket_init_default;
|
||||||
|
pb_istream_t stream = pb_istream_from_buffer(data, length);
|
||||||
|
// Ignore any inputs that fail to decode or have fields set that are not transmitted over LoRa.
|
||||||
|
if (!pb_decode(&stream, &meshtastic_MeshPacket_msg, &p) || p.rx_time || p.rx_snr || p.priority || p.rx_rssi || p.delayed ||
|
||||||
|
p.public_key.size || p.next_hop || p.relay_node || p.tx_after)
|
||||||
|
return -1; // Reject: The input will not be added to the corpus.
|
||||||
|
if (p.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {
|
||||||
|
meshtastic_Data d;
|
||||||
|
stream = pb_istream_from_buffer(p.decoded.payload.bytes, p.decoded.payload.size);
|
||||||
|
if (!pb_decode(&stream, &meshtastic_Data_msg, &d))
|
||||||
|
return -1; // Reject: The input will not be added to the corpus.
|
||||||
|
}
|
||||||
|
|
||||||
|
// Provide default values for a few fields so the fuzzer doesn't need to guess them.
|
||||||
|
if (p.from == 0)
|
||||||
|
p.from = nodeDB->getNodeNum();
|
||||||
|
if (p.to == 0)
|
||||||
|
p.to = nodeDB->getNodeNum();
|
||||||
|
static uint32_t packetId = 0;
|
||||||
|
if (p.id == 0)
|
||||||
|
p.id == ++packetId;
|
||||||
|
if (p.pki_encrypted && config.security.admin_key_count)
|
||||||
|
memcpy(&p.public_key, &config.security.admin_key[0], sizeof(p.public_key));
|
||||||
|
|
||||||
|
router->enqueueReceivedMessage(packetPool.allocCopy(p));
|
||||||
|
runLoopOnce();
|
||||||
|
return 0; // Accept: The input may be added to the corpus.
|
||||||
|
}
|
||||||
|
}
|
||||||
2
.clusterfuzzlite/router_fuzzer.options
Normal file
2
.clusterfuzzlite/router_fuzzer.options
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[libfuzzer]
|
||||||
|
max_len=256
|
||||||
168
.clusterfuzzlite/router_fuzzer_seed_corpus.py
Normal file
168
.clusterfuzzlite/router_fuzzer_seed_corpus.py
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
"""Generate an initial set of MeshPackets.
|
||||||
|
|
||||||
|
The fuzzer uses these MeshPackets as an initial seed of test candidates.
|
||||||
|
|
||||||
|
It's also good to add any previously discovered crash test cases to this list
|
||||||
|
to avoid future regressions.
|
||||||
|
|
||||||
|
If left unset, the following values will be automatically set by the fuzzer.
|
||||||
|
- to: automatically set to the running node's NodeID
|
||||||
|
- from: automatically set to the running node's NodeID
|
||||||
|
- id: automatically set to the value of an incrementing counter
|
||||||
|
|
||||||
|
Additionally, if `pki_encrypted` is populated in the packet, the first admin key
|
||||||
|
will be copied into the `public_key` field.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import base64
|
||||||
|
|
||||||
|
from meshtastic import BROADCAST_NUM
|
||||||
|
from meshtastic.protobuf import (
|
||||||
|
admin_pb2,
|
||||||
|
atak_pb2,
|
||||||
|
mesh_pb2,
|
||||||
|
portnums_pb2,
|
||||||
|
telemetry_pb2,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def From(node: int = 9):
|
||||||
|
"""Return a dict suitable for **kwargs for populating the 'from' field.
|
||||||
|
|
||||||
|
'from' is a reserved keyword in Python. It can't be used directly as an
|
||||||
|
argument to the MeshPacket constructor. Rather **From() can be used as
|
||||||
|
the final argument to provide the from node as a **kwarg.
|
||||||
|
|
||||||
|
Defaults to 9 if no value is provided.
|
||||||
|
"""
|
||||||
|
return {"from": node}
|
||||||
|
|
||||||
|
|
||||||
|
packets = (
|
||||||
|
(
|
||||||
|
"position",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.POSITION_APP,
|
||||||
|
payload=mesh_pb2.Position(
|
||||||
|
latitude_i=int(1 * 1e7),
|
||||||
|
longitude_i=int(2 * 1e7),
|
||||||
|
altitude=5,
|
||||||
|
precision_bits=32,
|
||||||
|
).SerializeToString(),
|
||||||
|
),
|
||||||
|
to=BROADCAST_NUM,
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"telemetry",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.TELEMETRY_APP,
|
||||||
|
payload=telemetry_pb2.Telemetry(
|
||||||
|
time=1736192207,
|
||||||
|
device_metrics=telemetry_pb2.DeviceMetrics(
|
||||||
|
battery_level=101,
|
||||||
|
channel_utilization=8,
|
||||||
|
air_util_tx=2,
|
||||||
|
uptime_seconds=42,
|
||||||
|
),
|
||||||
|
).SerializeToString(),
|
||||||
|
),
|
||||||
|
to=BROADCAST_NUM,
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"text",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.TEXT_MESSAGE_APP,
|
||||||
|
payload=b"Hello world",
|
||||||
|
),
|
||||||
|
to=BROADCAST_NUM,
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"user",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.NODEINFO_APP,
|
||||||
|
payload=mesh_pb2.User(
|
||||||
|
id="!00000009",
|
||||||
|
long_name="Node 9",
|
||||||
|
short_name="N9",
|
||||||
|
macaddr=b"\x00\x00\x00\x00\x00\x09",
|
||||||
|
hw_model=mesh_pb2.HardwareModel.RAK4631,
|
||||||
|
public_key=base64.b64decode(
|
||||||
|
"L0ih/6F41itofdE8mYyHk1SdfOJ/QRM1KQ+pO4vEEjQ="
|
||||||
|
),
|
||||||
|
).SerializeToString(),
|
||||||
|
),
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"traceroute",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.TRACEROUTE_APP,
|
||||||
|
payload=mesh_pb2.RouteDiscovery(
|
||||||
|
route=[10],
|
||||||
|
).SerializeToString(),
|
||||||
|
),
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"routing",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.ROUTING_APP,
|
||||||
|
payload=mesh_pb2.Routing(
|
||||||
|
error_reason=mesh_pb2.Routing.NO_RESPONSE,
|
||||||
|
).SerializeToString(),
|
||||||
|
),
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"admin",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.ADMIN_APP,
|
||||||
|
payload=admin_pb2.AdminMessage(
|
||||||
|
get_owner_request=True,
|
||||||
|
).SerializeToString(),
|
||||||
|
),
|
||||||
|
pki_encrypted=True,
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"atak",
|
||||||
|
mesh_pb2.MeshPacket(
|
||||||
|
decoded=mesh_pb2.Data(
|
||||||
|
portnum=portnums_pb2.PortNum.ATAK_PLUGIN,
|
||||||
|
payload=atak_pb2.TAKPacket(
|
||||||
|
is_compressed=True,
|
||||||
|
# Note, the strings are not valid for a compressed message, but will
|
||||||
|
# give the fuzzer a starting point.
|
||||||
|
contact=atak_pb2.Contact(
|
||||||
|
callsign="callsign", device_callsign="device_callsign"
|
||||||
|
),
|
||||||
|
chat=atak_pb2.GeoChat(
|
||||||
|
message="message", to="to", to_callsign="to_callsign"
|
||||||
|
),
|
||||||
|
).SerializeToString(),
|
||||||
|
),
|
||||||
|
**From(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
for name, packet in packets:
|
||||||
|
with open(f"{name}.MeshPacket", "wb") as f:
|
||||||
|
f.write(packet.SerializeToString())
|
||||||
183
.devcontainer/99-platformio-udev.rules
Normal file
183
.devcontainer/99-platformio-udev.rules
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
#####################################################################################
|
||||||
|
#
|
||||||
|
# INSTALLATION
|
||||||
|
#
|
||||||
|
# Please visit > https://docs.platformio.org/en/latest/core/installation/udev-rules.html
|
||||||
|
#
|
||||||
|
#####################################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Boards
|
||||||
|
#
|
||||||
|
|
||||||
|
# CP210X USB UART
|
||||||
|
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea[67][013]", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="80a9", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# FT231XS USB UART
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Prolific Technology, Inc. PL2303 Serial Port
|
||||||
|
ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# QinHeng Electronics HL-340 USB-Serial adapter
|
||||||
|
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
# QinHeng Electronics CH343 USB-Serial adapter
|
||||||
|
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d3", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
# QinHeng Electronics CH9102 USB-Serial adapter
|
||||||
|
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Arduino boards
|
||||||
|
ATTRS{idVendor}=="2341", ATTRS{idProduct}=="[08][023]*", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="[08][02]*", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Arduino SAM-BA
|
||||||
|
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{MTP_NO_PROBE}="1"
|
||||||
|
|
||||||
|
# Digistump boards
|
||||||
|
ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Maple with DFU
|
||||||
|
ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="000[34]", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# USBtiny
|
||||||
|
ATTRS{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# USBasp V2.0
|
||||||
|
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Teensy boards
|
||||||
|
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
|
||||||
|
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
|
||||||
|
|
||||||
|
# TI Stellaris Launchpad
|
||||||
|
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# TI MSP430 Launchpad
|
||||||
|
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# GD32V DFU Bootloader
|
||||||
|
ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# FireBeetle-ESP32
|
||||||
|
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7522", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Wio Terminal
|
||||||
|
ATTRS{idVendor}=="2886", ATTRS{idProduct}=="[08]02d", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Raspberry Pi Pico
|
||||||
|
ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="[01]*", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# AIR32F103
|
||||||
|
ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0204", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# STM32 virtual COM port
|
||||||
|
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Debuggers
|
||||||
|
#
|
||||||
|
|
||||||
|
# Black Magic Probe
|
||||||
|
SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic GDB Server", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic UART Port", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# opendous and estick
|
||||||
|
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204f", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Original FT232/FT245/FT2232/FT232H/FT4232
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="60[01][104]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# DISTORTEC JTAG-lock-pick Tiny 2
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8220", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# TUMPA, TUMPA Lite
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a9[89]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# XDS100v2
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a6d0", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Xverve Signalyzer Tool (DT-USB-ST), Signalyzer LITE (DT-USB-SLITE)
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bca[01]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# TI/Luminary Stellaris Evaluation Board FTDI (several)
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bcd[9a]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# egnite Turtelizer 2
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bdc8", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Section5 ICEbear
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c14[01]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Amontec JTAGkey and JTAGkey-tiny
|
||||||
|
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# TI ICDI
|
||||||
|
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="c32a", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# STLink probes
|
||||||
|
ATTRS{idVendor}=="0483", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Hilscher NXHX Boards
|
||||||
|
ATTRS{idVendor}=="0640", ATTRS{idProduct}=="0028", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Hitex probes
|
||||||
|
ATTRS{idVendor}=="0640", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Altera USB Blaster
|
||||||
|
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Amontec JTAGkey-HiSpeed
|
||||||
|
ATTRS{idVendor}=="0fbb", ATTRS{idProduct}=="1000", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# SEGGER J-Link
|
||||||
|
ATTRS{idVendor}=="1366", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Raisonance RLink
|
||||||
|
ATTRS{idVendor}=="138e", ATTRS{idProduct}=="9000", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Debug Board for Neo1973
|
||||||
|
ATTRS{idVendor}=="1457", ATTRS{idProduct}=="5118", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Olimex probes
|
||||||
|
ATTRS{idVendor}=="15ba", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# USBprog with OpenOCD firmware
|
||||||
|
ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c63", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# TI/Luminary Stellaris In-Circuit Debug Interface (ICDI) Board
|
||||||
|
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Marvell Sheevaplug
|
||||||
|
ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Keil Software, Inc. ULink
|
||||||
|
ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2710", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# CMSIS-DAP compatible adapters
|
||||||
|
ATTRS{product}=="*CMSIS-DAP*", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Atmel AVR Dragon
|
||||||
|
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Espressif USB JTAG/serial debug unit
|
||||||
|
ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
|
|
||||||
|
# Zephyr framework USB CDC-ACM
|
||||||
|
ATTRS{idVendor}=="2fe3", ATTRS{idProduct}=="0100", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12
|
FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12
|
||||||
|
|
||||||
# [Optional] Uncomment this section to install additional packages.
|
USER root
|
||||||
|
|
||||||
|
# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue
|
||||||
|
# trunk-ignore(hadolint/DL3008): Use latest version of packages
|
||||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get -y install --no-install-recommends \
|
&& apt-get -y install --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
@@ -20,6 +23,16 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|||||||
python3-wheel \
|
python3-wheel \
|
||||||
wget \
|
wget \
|
||||||
zip \
|
zip \
|
||||||
|
usbutils \
|
||||||
|
hwdata \
|
||||||
|
gpg \
|
||||||
|
gnupg2 \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pipx install platformio==6.1.15
|
RUN pipx install platformio==6.1.15
|
||||||
|
|
||||||
|
COPY 99-platformio-udev.rules /etc/udev/rules.d/99-platformio-udev.rules
|
||||||
|
|
||||||
|
USER vscode
|
||||||
|
|
||||||
|
HEALTHCHECK NONE
|
||||||
@@ -13,13 +13,24 @@
|
|||||||
},
|
},
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": ["ms-vscode.cpptools", "platformio.platformio-ide"]
|
"extensions": [
|
||||||
|
"ms-vscode.cpptools",
|
||||||
|
"platformio.platformio-ide",
|
||||||
|
"Trunk.io"
|
||||||
|
],
|
||||||
|
"unwantedRecommendations": ["ms-azuretools.vscode-docker"],
|
||||||
|
"settings": {
|
||||||
|
"extensions.ignoreRecommendations": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [4403],
|
"forwardPorts": [4403],
|
||||||
|
|
||||||
|
// Use "--device=" to make a local device available inside the container.
|
||||||
|
// "runArgs": ["--device=/dev/ttyACM0"],
|
||||||
|
|
||||||
// Run commands to prepare the container for use
|
// Run commands to prepare the container for use
|
||||||
"postCreateCommand": ".devcontainer/setup.sh"
|
"postCreateCommand": ".devcontainer/setup.sh"
|
||||||
}
|
}
|
||||||
|
|||||||
1
.dockerignore
Symbolic link
1
.dockerignore
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
.gitignore
|
||||||
4
.env.example
Normal file
4
.env.example
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Absolute path to the local meshtastic config.yaml file
|
||||||
|
CONFIG_PATH=/path/to/meshtastic/config.yaml
|
||||||
|
# USB device to passthrough (`lsusb -t`: look for `ch341`)
|
||||||
|
USB_DEVICE=/dev/bus/usb/001/037
|
||||||
15
.github/actions/build-variant/action.yml
vendored
15
.github/actions/build-variant/action.yml
vendored
@@ -31,6 +31,10 @@ inputs:
|
|||||||
description: Include the web UI in the build
|
description: Include the web UI in the build
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
arch:
|
||||||
|
description: Processor arch name
|
||||||
|
required: true
|
||||||
|
default: "esp32"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -47,6 +51,7 @@ runs:
|
|||||||
file: build.tar
|
file: build.tar
|
||||||
target: build.tar
|
target: build.tar
|
||||||
token: ${{ inputs.github_token }}
|
token: ${{ inputs.github_token }}
|
||||||
|
version: tags/v2.5.3
|
||||||
|
|
||||||
- name: Unpack web ui
|
- name: Unpack web ui
|
||||||
if: inputs.include-web-ui == 'true'
|
if: inputs.include-web-ui == 'true'
|
||||||
@@ -63,6 +68,12 @@ runs:
|
|||||||
sed -i '/DDEBUG_HEAP/d' ${INI_FILE}
|
sed -i '/DDEBUG_HEAP/d' ${INI_FILE}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: PlatformIO ${{ inputs.arch }} download cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.platformio/.cache
|
||||||
|
key: pio-cache-${{ inputs.arch }}-${{ hashFiles('.github/actions/**', '**.ini') }}
|
||||||
|
|
||||||
- name: Build ${{ inputs.board }}
|
- name: Build ${{ inputs.board }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ${{ inputs.build-script-path }} ${{ inputs.board }}
|
run: ${{ inputs.build-script-path }} ${{ inputs.board }}
|
||||||
@@ -78,13 +89,13 @@ runs:
|
|||||||
|
|
||||||
- name: Get release version string
|
- name: Get release version string
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
name: firmware-${{ inputs.arch }}-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
${{ inputs.artifact-paths }}
|
${{ inputs.artifact-paths }}
|
||||||
|
|||||||
18
.github/actions/setup-base/action.yml
vendored
18
.github/actions/setup-base/action.yml
vendored
@@ -11,23 +11,25 @@ runs:
|
|||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Uncomment build epoch
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i 's/#-DBUILD_EPOCH=$UNIX_TIME/-DBUILD_EPOCH=$UNIX_TIME/' platformio.ini
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update --fix-missing
|
sudo apt-get -y update --fix-missing
|
||||||
sudo apt-get install -y cppcheck libbluetooth-dev libgpiod-dev libyaml-cpp-dev
|
sudo apt-get install -y cppcheck libbluetooth-dev libgpiod-dev libyaml-cpp-dev lsb-release
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
cache: pip
|
||||||
# - name: Cache python libs
|
cache-dependency-path: |
|
||||||
# uses: actions/cache@v4
|
.github/actions/**
|
||||||
# id: cache-pip # needed in if test
|
**.ini
|
||||||
# with:
|
|
||||||
# path: ~/.cache/pip
|
|
||||||
# key: ${{ runner.os }}-pip
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
- name: Upgrade python tools
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
14
.github/actions/setup-native/action.yml
vendored
Normal file
14
.github/actions/setup-native/action.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: Setup native build
|
||||||
|
description: Install libraries needed for building the Native/Portduino build
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Setup base
|
||||||
|
id: base
|
||||||
|
uses: ./.github/actions/setup-base
|
||||||
|
|
||||||
|
- name: Install libs needed for native build
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev libusb-1.0-0-dev libi2c-dev
|
||||||
72
.github/workflows/build_debian_src.yml
vendored
Normal file
72
.github/workflows/build_debian_src.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
name: Build Debian Source Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
PPA_GPG_PRIVATE_KEY:
|
||||||
|
required: true
|
||||||
|
inputs:
|
||||||
|
series:
|
||||||
|
description: Ubuntu/Debian series to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
build_location:
|
||||||
|
description: Location where build will execute
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-debian-src:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
path: meshtasticd
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install deps
|
||||||
|
shell: bash
|
||||||
|
working-directory: meshtasticd
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y --fix-missing
|
||||||
|
sudo apt-get install -y software-properties-common build-essential devscripts equivs
|
||||||
|
sudo add-apt-repository ppa:meshtastic/build-tools -y
|
||||||
|
sudo apt-get update -y --fix-missing
|
||||||
|
sudo mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
|
||||||
|
|
||||||
|
- name: Import GPG key
|
||||||
|
uses: crazy-max/ghaction-import-gpg@v6
|
||||||
|
with:
|
||||||
|
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||||
|
id: gpg
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
working-directory: meshtasticd
|
||||||
|
run: |
|
||||||
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
BUILD_LOCATION: ${{ inputs.build_location }}
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Fetch libdeps, package debian source
|
||||||
|
working-directory: meshtasticd
|
||||||
|
run: debian/ci_pack_sdeb.sh
|
||||||
|
env:
|
||||||
|
SERIES: ${{ inputs.series }}
|
||||||
|
GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }}
|
||||||
|
PKG_VERSION: ${{ steps.version.outputs.deb }}
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
||||||
|
overwrite: true
|
||||||
|
path: |
|
||||||
|
meshtasticd_${{ steps.version.outputs.deb }}*
|
||||||
4
.github/workflows/build_esp32.yml
vendored
4
.github/workflows/build_esp32.yml
vendored
@@ -7,6 +7,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-esp32:
|
build-esp32:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -24,6 +26,7 @@ jobs:
|
|||||||
./arch/esp32/esp32s2.ini
|
./arch/esp32/esp32s2.ini
|
||||||
./arch/esp32/esp32s3.ini
|
./arch/esp32/esp32s3.ini
|
||||||
./arch/esp32/esp32c3.ini
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
build-script-path: bin/build-esp32.sh
|
build-script-path: bin/build-esp32.sh
|
||||||
ota-firmware-source: firmware.bin
|
ota-firmware-source: firmware.bin
|
||||||
ota-firmware-target: release/bleota.bin
|
ota-firmware-target: release/bleota.bin
|
||||||
@@ -31,3 +34,4 @@ jobs:
|
|||||||
release/*.bin
|
release/*.bin
|
||||||
release/*.elf
|
release/*.elf
|
||||||
include-web-ui: true
|
include-web-ui: true
|
||||||
|
arch: esp32
|
||||||
|
|||||||
3
.github/workflows/build_esp32_c3.yml
vendored
3
.github/workflows/build_esp32_c3.yml
vendored
@@ -26,9 +26,12 @@ jobs:
|
|||||||
./arch/esp32/esp32s2.ini
|
./arch/esp32/esp32s2.ini
|
||||||
./arch/esp32/esp32s3.ini
|
./arch/esp32/esp32s3.ini
|
||||||
./arch/esp32/esp32c3.ini
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
build-script-path: bin/build-esp32.sh
|
build-script-path: bin/build-esp32.sh
|
||||||
ota-firmware-source: firmware-c3.bin
|
ota-firmware-source: firmware-c3.bin
|
||||||
ota-firmware-target: release/bleota-c3.bin
|
ota-firmware-target: release/bleota-c3.bin
|
||||||
artifact-paths: |
|
artifact-paths: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
release/*.elf
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
|
arch: esp32c3
|
||||||
|
|||||||
2
.github/workflows/build_esp32_c6.yml
vendored
2
.github/workflows/build_esp32_c6.yml
vendored
@@ -33,3 +33,5 @@ jobs:
|
|||||||
artifact-paths: |
|
artifact-paths: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
release/*.elf
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
|
arch: esp32c6
|
||||||
|
|||||||
4
.github/workflows/build_esp32_s3.yml
vendored
4
.github/workflows/build_esp32_s3.yml
vendored
@@ -7,6 +7,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-esp32-s3:
|
build-esp32-s3:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -24,6 +26,7 @@ jobs:
|
|||||||
./arch/esp32/esp32s2.ini
|
./arch/esp32/esp32s2.ini
|
||||||
./arch/esp32/esp32s3.ini
|
./arch/esp32/esp32s3.ini
|
||||||
./arch/esp32/esp32c3.ini
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
build-script-path: bin/build-esp32.sh
|
build-script-path: bin/build-esp32.sh
|
||||||
ota-firmware-source: firmware-s3.bin
|
ota-firmware-source: firmware-s3.bin
|
||||||
ota-firmware-target: release/bleota-s3.bin
|
ota-firmware-target: release/bleota-s3.bin
|
||||||
@@ -31,3 +34,4 @@ jobs:
|
|||||||
release/*.bin
|
release/*.bin
|
||||||
release/*.elf
|
release/*.elf
|
||||||
include-web-ui: true
|
include-web-ui: true
|
||||||
|
arch: esp32s3
|
||||||
|
|||||||
85
.github/workflows/build_native.yml
vendored
85
.github/workflows/build_native.yml
vendored
@@ -1,85 +0,0 @@
|
|||||||
name: Build Native
|
|
||||||
|
|
||||||
on: workflow_call
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-native:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Install libs needed for native build
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get update --fix-missing
|
|
||||||
sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio adafruit-nrfutil
|
|
||||||
pip install -U meshtastic --pre
|
|
||||||
|
|
||||||
- name: Upgrade platformio
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pio upgrade
|
|
||||||
|
|
||||||
- name: Build Native
|
|
||||||
run: bin/build-native.sh
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-native-${{ steps.version.outputs.version }}.zip
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
release/meshtasticd_linux_x86_64
|
|
||||||
bin/config-dist.yaml
|
|
||||||
|
|
||||||
- name: Docker login
|
|
||||||
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
continue-on-error: true # FIXME: Failing docker login auth
|
|
||||||
with:
|
|
||||||
username: meshtastic
|
|
||||||
password: ${{ secrets.DOCKER_FIRMWARE_TOKEN }}
|
|
||||||
|
|
||||||
- name: Docker setup
|
|
||||||
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
|
||||||
continue-on-error: true # FIXME: Failing docker login auth
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Docker build and push tagged versions
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
continue-on-error: true # FIXME: Failing docker login auth
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: meshtastic/device-simulator:${{ steps.version.outputs.version }}
|
|
||||||
|
|
||||||
- name: Docker build and push
|
|
||||||
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
|
||||||
continue-on-error: true # FIXME: Failing docker login auth
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: meshtastic/device-simulator:latest
|
|
||||||
1
.github/workflows/build_nrf52.yml
vendored
1
.github/workflows/build_nrf52.yml
vendored
@@ -25,3 +25,4 @@ jobs:
|
|||||||
release/*.uf2
|
release/*.uf2
|
||||||
release/*.elf
|
release/*.elf
|
||||||
release/*.zip
|
release/*.zip
|
||||||
|
arch: nrf52840
|
||||||
|
|||||||
52
.github/workflows/build_raspbian.yml
vendored
52
.github/workflows/build_raspbian.yml
vendored
@@ -1,52 +0,0 @@
|
|||||||
name: Build Raspbian
|
|
||||||
|
|
||||||
on: workflow_call
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-raspbian:
|
|
||||||
runs-on: [self-hosted, linux, ARM64]
|
|
||||||
steps:
|
|
||||||
- name: Install libbluetooth
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
apt-get update -y --fix-missing
|
|
||||||
apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio adafruit-nrfutil
|
|
||||||
pip install -U meshtastic --pre
|
|
||||||
|
|
||||||
- name: Upgrade platformio
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pio upgrade
|
|
||||||
|
|
||||||
- name: Build Raspbian
|
|
||||||
run: bin/build-native.sh
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-raspbian-${{ steps.version.outputs.version }}.zip
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
release/meshtasticd_linux_aarch64
|
|
||||||
bin/config-dist.yaml
|
|
||||||
52
.github/workflows/build_raspbian_armv7l.yml
vendored
52
.github/workflows/build_raspbian_armv7l.yml
vendored
@@ -1,52 +0,0 @@
|
|||||||
name: Build Raspbian Arm
|
|
||||||
|
|
||||||
on: workflow_call
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-raspbian-armv7l:
|
|
||||||
runs-on: [self-hosted, linux, ARM]
|
|
||||||
steps:
|
|
||||||
- name: Install libbluetooth
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
apt-get update -y --fix-missing
|
|
||||||
apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio adafruit-nrfutil
|
|
||||||
pip install -U meshtastic --pre
|
|
||||||
|
|
||||||
- name: Upgrade platformio
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pio upgrade
|
|
||||||
|
|
||||||
- name: Build Raspbian
|
|
||||||
run: bin/build-native.sh
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-raspbian-armv7l-${{ steps.version.outputs.version }}.zip
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
release/meshtasticd_linux_armv7l
|
|
||||||
bin/config-dist.yaml
|
|
||||||
1
.github/workflows/build_rpi2040.yml
vendored
1
.github/workflows/build_rpi2040.yml
vendored
@@ -23,3 +23,4 @@ jobs:
|
|||||||
artifact-paths: |
|
artifact-paths: |
|
||||||
release/*.uf2
|
release/*.uf2
|
||||||
release/*.elf
|
release/*.elf
|
||||||
|
arch: rp2040
|
||||||
|
|||||||
2
.github/workflows/build_stm32.yml
vendored
2
.github/workflows/build_stm32.yml
vendored
@@ -23,3 +23,5 @@ jobs:
|
|||||||
artifact-paths: |
|
artifact-paths: |
|
||||||
release/*.hex
|
release/*.hex
|
||||||
release/*.bin
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
arch: stm32
|
||||||
|
|||||||
51
.github/workflows/daily_packaging.yml
vendored
Normal file
51
.github/workflows/daily_packaging.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
name: Daily Packaging
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 9 * * *
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- debian/**
|
||||||
|
- "*.rpkg"
|
||||||
|
- .github/workflows/nightly_packaging.yml
|
||||||
|
- .github/workflows/build_debian_src.yml
|
||||||
|
- .github/workflows/package_ppa.yml
|
||||||
|
- .github/workflows/package_obs.yml
|
||||||
|
- .github/workflows/hook_copr.yml
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-multiarch:
|
||||||
|
uses: ./.github/workflows/docker_manifest.yml
|
||||||
|
with:
|
||||||
|
release_channel: daily
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
package-ppa:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
series: [plucky, oracular, noble, jammy]
|
||||||
|
uses: ./.github/workflows/package_ppa.yml
|
||||||
|
with:
|
||||||
|
ppa_repo: ppa:meshtastic/daily
|
||||||
|
series: ${{ matrix.series }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
package-obs:
|
||||||
|
uses: ./.github/workflows/package_obs.yml
|
||||||
|
with:
|
||||||
|
obs_project: network:Meshtastic:daily
|
||||||
|
series: unstable
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
hook-copr:
|
||||||
|
uses: ./.github/workflows/hook_copr.yml
|
||||||
|
with:
|
||||||
|
copr_project: daily
|
||||||
|
secrets: inherit
|
||||||
92
.github/workflows/docker_build.yml
vendored
Normal file
92
.github/workflows/docker_build.yml
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
name: Build Docker
|
||||||
|
|
||||||
|
# Build Docker image, push untagged (digest-only)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
DOCKER_FIRMWARE_TOKEN:
|
||||||
|
required: false # Only required for push
|
||||||
|
inputs:
|
||||||
|
distro:
|
||||||
|
description: Distro to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
# choices: [debian, alpine]
|
||||||
|
platform:
|
||||||
|
description: Platform to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
runs-on:
|
||||||
|
description: Runner to use
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
push:
|
||||||
|
description: Push images to registry
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
outputs:
|
||||||
|
digest:
|
||||||
|
description: Digest of built image
|
||||||
|
value: ${{ jobs.docker-build.outputs.digest }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-build:
|
||||||
|
outputs:
|
||||||
|
digest: ${{ steps.docker_variant.outputs.digest }}
|
||||||
|
runs-on: ${{ inputs.runs-on }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: |
|
||||||
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Docker login
|
||||||
|
if: ${{ inputs.push }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: meshtastic
|
||||||
|
password: ${{ secrets.DOCKER_FIRMWARE_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Docker setup
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Sanitize platform string
|
||||||
|
id: sanitize_platform
|
||||||
|
# Replace slashes with underscores
|
||||||
|
run: echo "cleaned_platform=${{ inputs.platform }}" | sed 's/\//_/g' >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Docker tag
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: meshtastic/meshtasticd
|
||||||
|
tags: |
|
||||||
|
GHA-${{ steps.version.outputs.long }}-${{ inputs.distro }}-${{ steps.sanitize_platform.outputs.cleaned_platform }}
|
||||||
|
flavor: latest=false
|
||||||
|
|
||||||
|
- name: Docker build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
id: docker_variant
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: |
|
||||||
|
${{ contains(inputs.distro, 'debian') && './Dockerfile' || contains(inputs.distro, 'alpine') && './alpine.Dockerfile' }}
|
||||||
|
push: ${{ inputs.push }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }} # Tag is only meant to be consumed by the "manifest" job
|
||||||
|
platforms: ${{ inputs.platform }}
|
||||||
186
.github/workflows/docker_manifest.yml
vendored
Normal file
186
.github/workflows/docker_manifest.yml
vendored
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
name: Build Docker Multi-Arch Manifest
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
DOCKER_FIRMWARE_TOKEN:
|
||||||
|
required: true
|
||||||
|
inputs:
|
||||||
|
release_channel:
|
||||||
|
description: Release channel to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-debian-amd64:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: debian
|
||||||
|
platform: linux/amd64
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
push: true
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
docker-debian-arm64:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: debian
|
||||||
|
platform: linux/arm64
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
push: true
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
docker-debian-armv7:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: debian
|
||||||
|
platform: linux/arm/v7
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
push: true
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
docker-alpine-amd64:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: alpine
|
||||||
|
platform: linux/amd64
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
push: true
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
docker-alpine-arm64:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: alpine
|
||||||
|
platform: linux/arm64
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
push: true
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
docker-alpine-armv7:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: alpine
|
||||||
|
platform: linux/arm/v7
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
push: true
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
docker-manifest:
|
||||||
|
needs:
|
||||||
|
# Debian
|
||||||
|
- docker-debian-amd64
|
||||||
|
- docker-debian-arm64
|
||||||
|
- docker-debian-armv7
|
||||||
|
# Alpine
|
||||||
|
- docker-alpine-amd64
|
||||||
|
- docker-alpine-arm64
|
||||||
|
- docker-alpine-armv7
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: |
|
||||||
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Enumerate tags
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
|
||||||
|
short = "${{ steps.version.outputs.short }}"
|
||||||
|
long = "${{ steps.version.outputs.long }}"
|
||||||
|
release_channel = "${{ inputs.release_channel }}"
|
||||||
|
tags = {
|
||||||
|
"beta": {
|
||||||
|
"debian": [
|
||||||
|
f"{short}", f"{long}", f"{short}-beta", f"{long}-beta", "beta", "latest",
|
||||||
|
f"{short}-debian", f"{long}-debian", f"{short}-beta-debian", f"{long}-beta-debian", "beta-debian"
|
||||||
|
],
|
||||||
|
"alpine": [
|
||||||
|
f"{short}-alpine", f"{long}-alpine", f"{short}-beta-alpine", f"{long}-beta-alpine", "beta-alpine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"alpha": {
|
||||||
|
"debian": [
|
||||||
|
f"{short}-alpha", f"{long}-alpha", "alpha",
|
||||||
|
f"{short}-alpha-debian", f"{long}-alpha-debian", "alpha-debian"
|
||||||
|
],
|
||||||
|
"alpine": [
|
||||||
|
f"{short}-alpha-alpine", f"{long}-alpha-alpine", "alpha-alpine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"daily": {
|
||||||
|
"debian": ["daily", "daily-debian"],
|
||||||
|
"alpine": ["daily-alpine"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
with open(os.environ["GITHUB_OUTPUT"], "a") as fh:
|
||||||
|
fh.write("debian<<EOF\n")
|
||||||
|
fh.write("\n".join(tags[release_channel]["debian"]))
|
||||||
|
fh.write("\nEOF\n")
|
||||||
|
|
||||||
|
fh.write("alpine<<EOF\n")
|
||||||
|
fh.write("\n".join(tags[release_channel]["alpine"]))
|
||||||
|
fh.write("\nEOF\n")
|
||||||
|
id: tags
|
||||||
|
|
||||||
|
- name: Docker login
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: meshtastic
|
||||||
|
password: ${{ secrets.DOCKER_FIRMWARE_TOKEN }}
|
||||||
|
|
||||||
|
- name: Docker meta (Debian)
|
||||||
|
id: meta_debian
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: meshtastic/meshtasticd
|
||||||
|
tags: |
|
||||||
|
${{ steps.tags.outputs.debian }}
|
||||||
|
flavor: latest=false
|
||||||
|
|
||||||
|
- name: Create Docker manifest (Debian)
|
||||||
|
id: manifest_debian
|
||||||
|
uses: int128/docker-manifest-create-action@v2
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
${{ steps.meta_debian.outputs.tags }}
|
||||||
|
push: true
|
||||||
|
sources: |
|
||||||
|
meshtastic/meshtasticd@${{ needs.docker-debian-amd64.outputs.digest }}
|
||||||
|
meshtastic/meshtasticd@${{ needs.docker-debian-arm64.outputs.digest }}
|
||||||
|
meshtastic/meshtasticd@${{ needs.docker-debian-armv7.outputs.digest }}
|
||||||
|
|
||||||
|
- name: Docker meta (Alpine)
|
||||||
|
id: meta_alpine
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: meshtastic/meshtasticd
|
||||||
|
tags: |
|
||||||
|
${{ steps.tags.outputs.alpine }}
|
||||||
|
|
||||||
|
- name: Create Docker manifest (Alpine)
|
||||||
|
id: manifest_alpine
|
||||||
|
uses: int128/docker-manifest-create-action@v2
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
${{ steps.meta_alpine.outputs.tags }}
|
||||||
|
push: true
|
||||||
|
sources: |
|
||||||
|
meshtastic/meshtasticd@${{ needs.docker-alpine-amd64.outputs.digest }}
|
||||||
|
meshtastic/meshtasticd@${{ needs.docker-alpine-arm64.outputs.digest }}
|
||||||
|
meshtastic/meshtasticd@${{ needs.docker-alpine-armv7.outputs.digest }}
|
||||||
35
.github/workflows/generate-userprefs.yml
vendored
Normal file
35
.github/workflows/generate-userprefs.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: Generate UsersPrefs JSON manifest
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- userPrefs.h
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-userprefs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Clang
|
||||||
|
run: sudo apt-get install -y clang
|
||||||
|
|
||||||
|
- name: Install trunk
|
||||||
|
run: curl https://get.trunk.io -fsSL | bash
|
||||||
|
|
||||||
|
- name: Generate userPrefs.jsom
|
||||||
|
run: python3 ./bin/build-userprefs-json.py
|
||||||
|
|
||||||
|
- name: Trunk format json
|
||||||
|
run: trunk format userPrefs.json
|
||||||
|
|
||||||
|
- name: Commit userPrefs.json
|
||||||
|
run: |
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
|
git config --global user.name "GitHub Actions"
|
||||||
|
git add userPrefs.json
|
||||||
|
git commit -m "Update userPrefs.json"
|
||||||
|
git push
|
||||||
38
.github/workflows/hook_copr.yml
vendored
Normal file
38
.github/workflows/hook_copr.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Trigger COPR build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
COPR_API_CONFIG:
|
||||||
|
inputs:
|
||||||
|
copr_project:
|
||||||
|
description: COPR project to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-copr-hook:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
ref: ${{ github.ref }}
|
||||||
|
repository: ${{ github.repository }}
|
||||||
|
|
||||||
|
- name: Trigger COPR build
|
||||||
|
uses: vidplace7/copr-build@main
|
||||||
|
id: copr_build
|
||||||
|
env:
|
||||||
|
COPR_API_TOKEN_CONFIG: ${{ secrets.COPR_API_CONFIG }}
|
||||||
|
with:
|
||||||
|
owner: "@meshtastic"
|
||||||
|
package-name: meshtasticd
|
||||||
|
project-name: ${{ inputs.copr_project }}
|
||||||
|
git-remote: "${{ github.server_url }}/${{ github.repository }}.git"
|
||||||
|
committish: ${{ github.sha }}
|
||||||
265
.github/workflows/main_matrix.yml
vendored
265
.github/workflows/main_matrix.yml
vendored
@@ -2,9 +2,6 @@ name: CI
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.head_ref || github.run_id }}
|
group: ci-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
#concurrency:
|
|
||||||
# group: ${{ github.ref }}
|
|
||||||
# cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
|
||||||
on:
|
on:
|
||||||
# # Triggers the workflow on push but only for the master branch
|
# # Triggers the workflow on push but only for the master branch
|
||||||
push:
|
push:
|
||||||
@@ -40,7 +37,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} quick)
|
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} quick)
|
||||||
fi
|
fi
|
||||||
echo "Name: ${{ github.ref_name }} Base: ${{ github.base_ref }} Head: ${{ github.head_ref }} Ref: ${{ github.ref }} Targets: $TARGETS"
|
echo "Name: ${{ github.ref_name }} Base: ${{ github.base_ref }} } Ref: ${{ github.ref }} Targets: $TARGETS"
|
||||||
echo "${{matrix.arch}}=$(jq -cn --argjson environments "$TARGETS" '{board: $environments}')" >> $GITHUB_OUTPUT
|
echo "${{matrix.arch}}=$(jq -cn --argjson environments "$TARGETS" '{board: $environments}')" >> $GITHUB_OUTPUT
|
||||||
outputs:
|
outputs:
|
||||||
esp32: ${{ steps.jsonStep.outputs.esp32 }}
|
esp32: ${{ steps.jsonStep.outputs.esp32 }}
|
||||||
@@ -131,14 +128,47 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
package-raspbian:
|
build-debian-src:
|
||||||
uses: ./.github/workflows/package_raspbian.yml
|
uses: ./.github/workflows/build_debian_src.yml
|
||||||
|
with:
|
||||||
|
series: UNRELEASED
|
||||||
|
build_location: local
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
package-raspbian-armv7l:
|
test-native:
|
||||||
uses: ./.github/workflows/package_raspbian_armv7l.yml
|
uses: ./.github/workflows/test_native.yml
|
||||||
|
|
||||||
# package-native:
|
docker-debian-amd64:
|
||||||
# uses: ./.github/workflows/package_amd64.yml
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: debian
|
||||||
|
platform: linux/amd64
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
push: false
|
||||||
|
|
||||||
|
docker-alpine-amd64:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: alpine
|
||||||
|
platform: linux/amd64
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
push: false
|
||||||
|
|
||||||
|
docker-debian-arm64:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: debian
|
||||||
|
platform: linux/arm64
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
push: false
|
||||||
|
|
||||||
|
docker-debian-armv7:
|
||||||
|
uses: ./.github/workflows/docker_build.yml
|
||||||
|
with:
|
||||||
|
distro: debian
|
||||||
|
platform: linux/arm/v7
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
push: false
|
||||||
|
|
||||||
after-checks:
|
after-checks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -155,8 +185,13 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [
|
needs:
|
||||||
|
[
|
||||||
build-esp32,
|
build-esp32,
|
||||||
build-esp32-s3,
|
build-esp32-s3,
|
||||||
build-esp32-c3,
|
build-esp32-c3,
|
||||||
@@ -164,9 +199,6 @@ jobs:
|
|||||||
build-nrf52,
|
build-nrf52,
|
||||||
build-rpi2040,
|
build-rpi2040,
|
||||||
build-stm32,
|
build-stm32,
|
||||||
package-raspbian,
|
|
||||||
package-raspbian-armv7l,
|
|
||||||
# package-native,
|
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -178,22 +210,23 @@ jobs:
|
|||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ./
|
path: ./
|
||||||
|
pattern: firmware-${{matrix.arch}}-*
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
- name: Get release version string
|
- name: Get release version string
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Move files up
|
- name: Move files up
|
||||||
run: mv -b -t ./ ./release/meshtasticd_linux_* ./bin/config-dist.yaml ./bin/device-*.sh ./bin/device-*.bat
|
run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat
|
||||||
|
|
||||||
- name: Repackage in single firmware zip
|
- name: Repackage in single firmware zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
./firmware-*.bin
|
./firmware-*.bin
|
||||||
@@ -202,16 +235,15 @@ jobs:
|
|||||||
./firmware-*-ota.zip
|
./firmware-*-ota.zip
|
||||||
./device-*.sh
|
./device-*.sh
|
||||||
./device-*.bat
|
./device-*.bat
|
||||||
./meshtasticd_linux_*
|
|
||||||
./config-dist.yaml
|
|
||||||
./littlefs-*.bin
|
./littlefs-*.bin
|
||||||
|
./littlefswebui-*.bin
|
||||||
./bleota*bin
|
./bleota*bin
|
||||||
./Meshtastic_nRF52_factory_erase*.uf2
|
./Meshtastic_nRF52_factory_erase*.uf2
|
||||||
retention-days: 90
|
retention-days: 30
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output
|
path: ./output
|
||||||
|
|
||||||
@@ -225,12 +257,12 @@ jobs:
|
|||||||
chmod +x ./output/device-update.sh
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./output
|
||||||
|
|
||||||
- name: Repackage in single elfs zip
|
- name: Repackage in single elfs zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: ./*.elf
|
path: ./*.elf
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
@@ -238,14 +270,16 @@ jobs:
|
|||||||
- uses: scruplelesswizard/comment-artifact@main
|
- uses: scruplelesswizard/comment-artifact@main
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
description: "Download firmware-${{ steps.version.outputs.version }}.zip. This artifact will be available for 90 days from creation"
|
description: "Download firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
release-artifacts:
|
release-artifacts:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
needs: [gather-artifacts]
|
outputs:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
needs: [gather-artifacts, build-debian-src]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -256,142 +290,115 @@ jobs:
|
|||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Get release version string
|
- name: Get release version string
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
|
||||||
merge-multiple: true
|
|
||||||
path: ./output
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Device scripts permissions
|
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./output/device-install.sh
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
chmod +x ./output/device-update.sh
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
- name: Zip firmware
|
env:
|
||||||
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output -x meshtasticd_*
|
BUILD_LOCATION: local
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
|
||||||
merge-multiple: true
|
|
||||||
path: ./elfs
|
|
||||||
|
|
||||||
- name: Zip Elfs
|
|
||||||
run: zip -j -9 -r ./debug-elfs-${{ steps.version.outputs.version }}.zip ./elfs
|
|
||||||
|
|
||||||
# For diagnostics
|
|
||||||
- name: Show artifacts
|
|
||||||
run: ls -lR
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: actions/create-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
id: create_release
|
id: create_release
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
release_name: Meshtastic Firmware ${{ steps.version.outputs.version }} Alpha
|
name: Meshtastic Firmware ${{ steps.version.outputs.long }} Alpha
|
||||||
tag_name: v${{ steps.version.outputs.version }}
|
tag_name: v${{ steps.version.outputs.long }}
|
||||||
body: |
|
body: |
|
||||||
Autogenerated by github action, developer should edit as required before publishing...
|
Autogenerated by github action, developer should edit as required before publishing...
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
- name: Add bins to release
|
- name: Download source deb
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/download-artifact@v4
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
pattern: firmware-debian-${{ steps.version.outputs.deb }}~UNRELEASED-src
|
||||||
asset_path: ./firmware-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_name: firmware-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Add debug elfs to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./debug-elfs-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: meshtasticd_${{ steps.version.outputs.version }}_*.deb
|
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output
|
path: ./output/debian-src
|
||||||
|
|
||||||
- name: Add raspbian aarch64 .deb
|
- name: Zip source deb
|
||||||
uses: actions/upload-release-asset@v1
|
working-directory: output
|
||||||
|
run: zip -j -9 -r ./meshtasticd-${{ steps.version.outputs.deb }}-src.zip ./debian-src
|
||||||
|
|
||||||
|
# For diagnostics
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: ls -lR
|
||||||
|
|
||||||
|
- name: Add source deb to release
|
||||||
|
run: |
|
||||||
|
gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd-${{ steps.version.outputs.deb }}-src.zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_arm64.deb
|
|
||||||
asset_name: meshtasticd_${{ steps.version.outputs.version }}_arm64.deb
|
|
||||||
asset_content_type: application/vnd.debian.binary-package
|
|
||||||
|
|
||||||
- name: Add raspbian armv7l .deb
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_armhf.deb
|
|
||||||
asset_name: meshtasticd_${{ steps.version.outputs.version }}_armhf.deb
|
|
||||||
asset_content_type: application/vnd.debian.binary-package
|
|
||||||
|
|
||||||
# - name: Add raspbian amd64 .deb
|
|
||||||
# uses: actions/upload-release-asset@v1
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
# with:
|
|
||||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
# asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_amd64.deb
|
|
||||||
# asset_name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb
|
|
||||||
# asset_content_type: application/vnd.debian.binary-package
|
|
||||||
|
|
||||||
- name: Bump version.properties
|
- name: Bump version.properties
|
||||||
run: >-
|
run: >-
|
||||||
bin/bump_version.py
|
bin/bump_version.py
|
||||||
|
|
||||||
|
- name: Update debian changelog
|
||||||
|
run: >-
|
||||||
|
debian/ci_changelog.sh
|
||||||
|
|
||||||
- name: Create version.properties pull request
|
- name: Create version.properties pull request
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v7
|
||||||
with:
|
with:
|
||||||
title: Bump version.properties
|
title: Bump version.properties
|
||||||
add-paths: |
|
add-paths: |
|
||||||
version.properties
|
version.properties
|
||||||
|
debian/changelog
|
||||||
|
|
||||||
- name: Checkout meshtastic/meshtastic.github.io
|
release-firmware:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
needs: [release-artifacts]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
repository: meshtastic/meshtastic.github.io
|
python-version: 3.x
|
||||||
token: ${{ secrets.ARTIFACTS_TOKEN }}
|
|
||||||
path: meshtastic.github.io
|
- name: Get release version string
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
pattern: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
|
merge-multiple: true
|
||||||
|
path: ./output
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
run: ls -R
|
run: ls -lR
|
||||||
|
|
||||||
- name: Extract firmware.zip
|
- name: Device scripts permissions
|
||||||
run: |
|
run: |
|
||||||
unzip ./firmware-${{ steps.version.outputs.version }}.zip -d meshtastic.github.io/firmware-${{ steps.version.outputs.version }}
|
chmod +x ./output/device-install.sh
|
||||||
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
|
- name: Zip firmware
|
||||||
|
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./output
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
|
merge-multiple: true
|
||||||
|
path: ./elfs
|
||||||
|
|
||||||
|
- name: Zip debug elfs
|
||||||
|
run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./elfs
|
||||||
|
|
||||||
|
# For diagnostics
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
run: ls -R
|
run: ls -lR
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Add bins and debug elfs to release
|
||||||
run: |
|
run: |
|
||||||
cd meshtastic.github.io
|
gh release upload v${{ steps.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
find . -type f -name 'meshtasticd_*' -exec rm -f {} +
|
gh release upload v${{ steps.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
git config --global user.name "github-actions[bot]"
|
env:
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
git add .
|
|
||||||
git commit -m "Add firmware version ${{ steps.version.outputs.version }}"
|
|
||||||
git push
|
|
||||||
|
|||||||
78
.github/workflows/package_amd64.yml
vendored
78
.github/workflows/package_amd64.yml
vendored
@@ -1,78 +0,0 @@
|
|||||||
name: Package Native
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-native:
|
|
||||||
uses: ./.github/workflows/build_native.yml
|
|
||||||
|
|
||||||
package-native:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: build-native
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Pull web ui
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@master
|
|
||||||
with:
|
|
||||||
repo: meshtastic/web
|
|
||||||
file: build.tar
|
|
||||||
target: build.tar
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-native-${{ steps.version.outputs.version }}.zip
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: build .debpkg
|
|
||||||
run: |
|
|
||||||
mkdir -p .debpkg/DEBIAN
|
|
||||||
mkdir -p .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
mkdir -p .debpkg/usr/sbin
|
|
||||||
mkdir -p .debpkg/etc/meshtasticd
|
|
||||||
mkdir -p .debpkg/usr/lib/systemd/system/
|
|
||||||
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
|
||||||
cp release/meshtasticd_linux_x86_64 .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
|
||||||
chmod +x .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service
|
|
||||||
echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles
|
|
||||||
chmod +x .debpkg/DEBIAN/conffiles
|
|
||||||
|
|
||||||
- uses: jiro4989/build-deb-action@v3
|
|
||||||
with:
|
|
||||||
package: meshtasticd
|
|
||||||
package_root: .debpkg
|
|
||||||
maintainer: Jonathan Bennett
|
|
||||||
version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.*
|
|
||||||
arch: amd64
|
|
||||||
depends: libyaml-cpp0.7, openssl, libulfius2.7
|
|
||||||
desc: Native Linux Meshtastic binary.
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
./*.deb
|
|
||||||
110
.github/workflows/package_obs.yml
vendored
Normal file
110
.github/workflows/package_obs.yml
vendored
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
name: Package for OpenSUSE Build Service
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
OBS_PASSWORD:
|
||||||
|
required: true
|
||||||
|
PPA_GPG_PRIVATE_KEY:
|
||||||
|
required: true
|
||||||
|
inputs:
|
||||||
|
obs_project:
|
||||||
|
description: Meshtastic OBS project to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
series:
|
||||||
|
description: Debian series to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-debian-src:
|
||||||
|
uses: ./.github/workflows/build_debian_src.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
series: ${{ inputs.series }}
|
||||||
|
build_location: obs
|
||||||
|
|
||||||
|
package-obs:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs: build-debian-src
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
path: meshtasticd
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install OpenSUSE Build Service deps
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo 'deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_24.04/ /' | sudo tee /etc/apt/sources.list.d/openSUSE:Tools.list
|
||||||
|
curl -fsSL https://download.opensuse.org/repositories/openSUSE:Tools/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/openSUSE_Tools.gpg > /dev/null
|
||||||
|
sudo apt-get update -y --fix-missing
|
||||||
|
sudo apt-get install -y osc
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
working-directory: meshtasticd
|
||||||
|
run: |
|
||||||
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
BUILD_LOCATION: obs
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: ls -lah
|
||||||
|
|
||||||
|
- name: Configure osc
|
||||||
|
env:
|
||||||
|
OBS_USERNAME: meshtastic
|
||||||
|
run: |
|
||||||
|
# Setup OpenSUSE Build Service credentials
|
||||||
|
mkdir -p ~/.config/osc
|
||||||
|
echo "[general]" > ~/.config/osc/oscrc
|
||||||
|
echo "apiurl=https://api.opensuse.org" >> ~/.config/osc/oscrc
|
||||||
|
echo "[https://api.opensuse.org]" >> ~/.config/osc/oscrc
|
||||||
|
echo "user=${{ env.OBS_USERNAME }}" >> ~/.config/osc/oscrc
|
||||||
|
echo "pass=${{ secrets.OBS_PASSWORD }}" >> ~/.config/osc/oscrc
|
||||||
|
echo "credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManager" >> ~/.config/osc/oscrc
|
||||||
|
# Create a temporary directory for osc checkout
|
||||||
|
mkdir -p osc
|
||||||
|
|
||||||
|
# Intentionally fail if credentials are invalid
|
||||||
|
# Update secrets if this returns `401`
|
||||||
|
- name: Verify OBS authentication
|
||||||
|
run: osc token
|
||||||
|
|
||||||
|
- name: Upload package to OBS
|
||||||
|
shell: bash
|
||||||
|
working-directory: osc
|
||||||
|
env:
|
||||||
|
OBS_PROJECT: ${{ inputs.obs_project }}
|
||||||
|
OBS_PACKAGE: meshtasticd
|
||||||
|
run: |
|
||||||
|
# Initialize the package in the current directory
|
||||||
|
osc checkout --output-dir . $OBS_PROJECT $OBS_PACKAGE
|
||||||
|
|
||||||
|
# Remove the existing package files
|
||||||
|
rm -rf *.dsc *.tar.xz
|
||||||
|
|
||||||
|
# Copy new package files to the directory
|
||||||
|
cp $GITHUB_WORKSPACE/*.dsc .
|
||||||
|
cp $GITHUB_WORKSPACE/*.tar.xz .
|
||||||
|
|
||||||
|
# Add/Remove the files
|
||||||
|
osc addremove
|
||||||
|
|
||||||
|
# Commit changes and push to OpenSUSE Build Service
|
||||||
|
osc commit -m "GitHub Actions: ${{ steps.version.outputs.deb }}~${{ inputs.series }}"
|
||||||
74
.github/workflows/package_ppa.yml
vendored
Normal file
74
.github/workflows/package_ppa.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
name: Package for Launchpad PPA
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
PPA_GPG_PRIVATE_KEY:
|
||||||
|
required: true
|
||||||
|
inputs:
|
||||||
|
ppa_repo:
|
||||||
|
description: Meshtastic PPA to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
series:
|
||||||
|
description: Ubuntu series to target
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-debian-src:
|
||||||
|
uses: ./.github/workflows/build_debian_src.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
series: ${{ inputs.series }}
|
||||||
|
build_location: ppa
|
||||||
|
|
||||||
|
package-ppa:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs: build-debian-src
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
path: meshtasticd
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install deps
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y --fix-missing
|
||||||
|
sudo apt-get install -y dput
|
||||||
|
|
||||||
|
- name: Import GPG key
|
||||||
|
uses: crazy-max/ghaction-import-gpg@v6
|
||||||
|
with:
|
||||||
|
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||||
|
id: gpg
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
working-directory: meshtasticd
|
||||||
|
run: |
|
||||||
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
BUILD_LOCATION: ppa
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: ls -lah
|
||||||
|
|
||||||
|
- name: Publish with dput
|
||||||
|
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
dput ${{ inputs.ppa_repo }} meshtasticd_${{ steps.version.outputs.deb }}~${{ inputs.series }}_source.changes
|
||||||
78
.github/workflows/package_raspbian.yml
vendored
78
.github/workflows/package_raspbian.yml
vendored
@@ -1,78 +0,0 @@
|
|||||||
name: Package Raspbian
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-raspbian:
|
|
||||||
uses: ./.github/workflows/build_raspbian.yml
|
|
||||||
|
|
||||||
package-raspbian:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: build-raspbian
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Pull web ui
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@master
|
|
||||||
with:
|
|
||||||
repo: meshtastic/web
|
|
||||||
file: build.tar
|
|
||||||
target: build.tar
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-raspbian-${{ steps.version.outputs.version }}.zip
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: build .debpkg
|
|
||||||
run: |
|
|
||||||
mkdir -p .debpkg/DEBIAN
|
|
||||||
mkdir -p .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
mkdir -p .debpkg/usr/sbin
|
|
||||||
mkdir -p .debpkg/etc/meshtasticd
|
|
||||||
mkdir -p .debpkg/usr/lib/systemd/system/
|
|
||||||
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
|
||||||
cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
|
||||||
chmod +x .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service
|
|
||||||
echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles
|
|
||||||
chmod +x .debpkg/DEBIAN/conffiles
|
|
||||||
|
|
||||||
- uses: jiro4989/build-deb-action@v3
|
|
||||||
with:
|
|
||||||
package: meshtasticd
|
|
||||||
package_root: .debpkg
|
|
||||||
maintainer: Jonathan Bennett
|
|
||||||
version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.*
|
|
||||||
arch: arm64
|
|
||||||
depends: libyaml-cpp0.7, openssl, libulfius2.7
|
|
||||||
desc: Native Linux Meshtastic binary.
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: meshtasticd_${{ steps.version.outputs.version }}_arm64.deb
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
./*.deb
|
|
||||||
78
.github/workflows/package_raspbian_armv7l.yml
vendored
78
.github/workflows/package_raspbian_armv7l.yml
vendored
@@ -1,78 +0,0 @@
|
|||||||
name: Package Raspbian
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-raspbian_armv7l:
|
|
||||||
uses: ./.github/workflows/build_raspbian_armv7l.yml
|
|
||||||
|
|
||||||
package-raspbian_armv7l:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs: build-raspbian_armv7l
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Pull web ui
|
|
||||||
uses: dsaltares/fetch-gh-release-asset@master
|
|
||||||
with:
|
|
||||||
repo: meshtastic/web
|
|
||||||
file: build.tar
|
|
||||||
target: build.tar
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-raspbian-armv7l-${{ steps.version.outputs.version }}.zip
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: build .debpkg
|
|
||||||
run: |
|
|
||||||
mkdir -p .debpkg/DEBIAN
|
|
||||||
mkdir -p .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
mkdir -p .debpkg/usr/sbin
|
|
||||||
mkdir -p .debpkg/etc/meshtasticd
|
|
||||||
mkdir -p .debpkg/usr/lib/systemd/system/
|
|
||||||
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
|
|
||||||
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
|
|
||||||
cp release/meshtasticd_linux_armv7l .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
|
|
||||||
chmod +x .debpkg/usr/sbin/meshtasticd
|
|
||||||
cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service
|
|
||||||
echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles
|
|
||||||
chmod +x .debpkg/DEBIAN/conffiles
|
|
||||||
|
|
||||||
- uses: jiro4989/build-deb-action@v3
|
|
||||||
with:
|
|
||||||
package: meshtasticd
|
|
||||||
package_root: .debpkg
|
|
||||||
maintainer: Jonathan Bennett
|
|
||||||
version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.*
|
|
||||||
arch: armhf
|
|
||||||
depends: libyaml-cpp0.7, openssl, libulfius2.7
|
|
||||||
desc: Native Linux Meshtastic binary.
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: meshtasticd_${{ steps.version.outputs.version }}_armhf.deb
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
./*.deb
|
|
||||||
45
.github/workflows/release_channels.yml
vendored
Normal file
45
.github/workflows/release_channels.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Trigger release workflows upon Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published, released]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
uses: ./.github/workflows/docker_manifest.yml
|
||||||
|
with:
|
||||||
|
release_channel: |-
|
||||||
|
${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
package-ppa:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
series: [plucky, oracular, noble, jammy]
|
||||||
|
uses: ./.github/workflows/package_ppa.yml
|
||||||
|
with:
|
||||||
|
ppa_repo: |-
|
||||||
|
ppa:meshtastic/${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
||||||
|
series: ${{ matrix.series }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
package-obs:
|
||||||
|
uses: ./.github/workflows/package_obs.yml
|
||||||
|
with:
|
||||||
|
obs_project: |-
|
||||||
|
network:Meshtastic:${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
||||||
|
series: |-
|
||||||
|
${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
hook-copr:
|
||||||
|
uses: ./.github/workflows/hook_copr.yml
|
||||||
|
with:
|
||||||
|
copr_project: |-
|
||||||
|
${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
||||||
|
secrets: inherit
|
||||||
22
.github/workflows/stale_bot.yml
vendored
Normal file
22
.github/workflows/stale_bot.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: process stale Issues and PR's
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 6 * * *
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
actions: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale_issues:
|
||||||
|
name: Close Stale Issues
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Stale PR+Issues
|
||||||
|
uses: actions/stale@v9.0.0
|
||||||
|
with:
|
||||||
|
exempt-issue-labels: pinned,3.0
|
||||||
|
exempt-pr-labels: pinned,3.0
|
||||||
169
.github/workflows/test_native.yml
vendored
Normal file
169
.github/workflows/test_native.yml
vendored
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
name: Run Tests on Native platform
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
LCOV_CAPTURE_FLAGS: --quiet --capture --include "${PWD}/src/*" --exclude '*/src/mesh/generated/*' --directory .pio/build/coverage/src --base-directory "${PWD}"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
simulator-tests:
|
||||||
|
name: Native Simulator Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup native build
|
||||||
|
id: base
|
||||||
|
uses: ./.github/actions/setup-native
|
||||||
|
|
||||||
|
- name: Install simulator dependencies
|
||||||
|
run: pip install -U dotmap
|
||||||
|
|
||||||
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
|
- name: Build for native/coverage
|
||||||
|
run: platformio run -e coverage
|
||||||
|
|
||||||
|
- name: Capture initial coverage information
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y lcov
|
||||||
|
lcov ${{ env.LCOV_CAPTURE_FLAGS }} --initial --output-file coverage_base.info
|
||||||
|
sed -i -e "s#${PWD}#.#" coverage_base.info # Make paths relative.
|
||||||
|
|
||||||
|
- name: Integration test
|
||||||
|
run: |
|
||||||
|
.pio/build/coverage/program &
|
||||||
|
PID=$!
|
||||||
|
timeout 20 bash -c "until ls -al /proc/$PID/fd | grep socket; do sleep 1; done"
|
||||||
|
echo "Simulator started, launching python test..."
|
||||||
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
wait
|
||||||
|
|
||||||
|
- name: Capture coverage information
|
||||||
|
if: always() # run this step even if previous step failed
|
||||||
|
run: |
|
||||||
|
lcov ${{ env.LCOV_CAPTURE_FLAGS }} --test-name integration --output-file coverage_integration.info
|
||||||
|
sed -i -e "s#${PWD}#.#" coverage_integration.info # Make paths relative.
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
if: always() # run this step even if previous step failed
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Save coverage information
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always() # run this step even if previous step failed
|
||||||
|
with:
|
||||||
|
name: lcov-coverage-info-native-simulator-test-${{ steps.version.outputs.long }}.zip
|
||||||
|
overwrite: true
|
||||||
|
path: ./coverage_*.info
|
||||||
|
|
||||||
|
platformio-tests:
|
||||||
|
name: Native PlatformIO Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup native build
|
||||||
|
id: base
|
||||||
|
uses: ./.github/actions/setup-native
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
# Disable (comment-out) BUILD_EPOCH. It causes a full rebuild between tests and resets the
|
||||||
|
# coverage information each time.
|
||||||
|
- name: Disable BUILD_EPOCH
|
||||||
|
run: sed -i 's/-DBUILD_EPOCH=$UNIX_TIME/#-DBUILD_EPOCH=$UNIX_TIME/' platformio.ini
|
||||||
|
|
||||||
|
- name: PlatformIO Tests
|
||||||
|
run: platformio test -e coverage -v --junit-output-path testreport.xml
|
||||||
|
|
||||||
|
- name: Save test results
|
||||||
|
if: always() # run this step even if previous step failed
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
|
||||||
|
overwrite: true
|
||||||
|
path: ./testreport.xml
|
||||||
|
|
||||||
|
- name: Capture coverage information
|
||||||
|
if: always() # run this step even if previous step failed
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y lcov
|
||||||
|
lcov ${{ env.LCOV_CAPTURE_FLAGS }} --test-name tests --output-file coverage_tests.info
|
||||||
|
sed -i -e "s#${PWD}#.#" coverage_tests.info # Make paths relative.
|
||||||
|
|
||||||
|
- name: Save coverage information
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always() # run this step even if previous step failed
|
||||||
|
with:
|
||||||
|
name: lcov-coverage-info-native-platformio-tests-${{ steps.version.outputs.long }}.zip
|
||||||
|
overwrite: true
|
||||||
|
path: ./coverage_*.info
|
||||||
|
|
||||||
|
generate-reports:
|
||||||
|
name: Generate Test Reports
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions: # Needed for dorny/test-reporter.
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
checks: write
|
||||||
|
needs:
|
||||||
|
- simulator-tests
|
||||||
|
- platformio-tests
|
||||||
|
if: always()
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Download test artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Test Report
|
||||||
|
uses: dorny/test-reporter@v1.9.1
|
||||||
|
with:
|
||||||
|
name: PlatformIO Tests
|
||||||
|
path: testreport.xml
|
||||||
|
reporter: java-junit
|
||||||
|
|
||||||
|
- name: Download coverage artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
pattern: lcov-coverage-info-native-*-${{ steps.version.outputs.long }}.zip
|
||||||
|
path: code-coverage-report
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Generate Code Coverage Report
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y lcov
|
||||||
|
lcov --quiet --add-tracefile code-coverage-report/coverage_base.info --add-tracefile code-coverage-report/coverage_integration.info --add-tracefile code-coverage-report/coverage_tests.info --output-file code-coverage-report/coverage_src.info
|
||||||
|
genhtml --quiet --legend --prefix "${PWD}" code-coverage-report/coverage_src.info --output-directory code-coverage-report
|
||||||
|
|
||||||
|
- name: Save Code Coverage Report
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: code-coverage-report-${{ steps.version.outputs.long }}.zip
|
||||||
|
path: code-coverage-report
|
||||||
51
.github/workflows/tests.yml
vendored
51
.github/workflows/tests.yml
vendored
@@ -6,55 +6,8 @@ on:
|
|||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-simulator:
|
native-tests:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/test_native.yml
|
||||||
steps:
|
|
||||||
- name: Install libbluetooth
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get update --fix-missing
|
|
||||||
sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio adafruit-nrfutil
|
|
||||||
pip install -U meshtastic --pre
|
|
||||||
|
|
||||||
- name: Upgrade platformio
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pio upgrade
|
|
||||||
|
|
||||||
- name: Build Native
|
|
||||||
run: bin/build-native.sh
|
|
||||||
|
|
||||||
# We now run integration test before other build steps (to quickly see runtime failures)
|
|
||||||
- name: Build for native
|
|
||||||
run: platformio run -e native
|
|
||||||
|
|
||||||
- name: Integration test
|
|
||||||
run: |
|
|
||||||
.pio/build/native/program & sleep 10 # 5 seconds was not enough
|
|
||||||
echo "Simulator started, launching python test..."
|
|
||||||
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
|
||||||
|
|
||||||
- name: PlatformIO Tests
|
|
||||||
run: platformio test -e native --junit-output-path testreport.xml
|
|
||||||
|
|
||||||
- name: Test Report
|
|
||||||
uses: dorny/test-reporter@v1.9.1
|
|
||||||
if: success() || failure() # run this step even if previous step failed
|
|
||||||
with:
|
|
||||||
name: PlatformIO Tests
|
|
||||||
path: testreport.xml
|
|
||||||
reporter: java-junit
|
|
||||||
|
|
||||||
hardware-tests:
|
hardware-tests:
|
||||||
runs-on: test-runner
|
runs-on: test-runner
|
||||||
|
|||||||
47
.github/workflows/trunk_format_pr.yml
vendored
Normal file
47
.github/workflows/trunk_format_pr.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: Run Trunk Fmt on PR Comment
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
trunk-fmt:
|
||||||
|
if: github.event.issue.pull_request != null && contains(github.event.comment.body, 'trunk fmt')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install trunk
|
||||||
|
run: curl https://get.trunk.io -fsSL | bash
|
||||||
|
|
||||||
|
- name: Run Trunk Fmt
|
||||||
|
run: trunk fmt
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add .
|
||||||
|
git commit -m "Add firmware version ${{ steps.version.outputs.long }}"
|
||||||
|
git push
|
||||||
|
|
||||||
|
- name: Comment on PR
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
script: |
|
||||||
|
github.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: '`trunk fmt` has been run on this PR.'
|
||||||
|
})
|
||||||
7
.github/workflows/update_protobufs.yml
vendored
7
.github/workflows/update_protobufs.yml
vendored
@@ -12,14 +12,15 @@ jobs:
|
|||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Update submodule
|
- name: Update submodule
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
run: |
|
run: |
|
||||||
git submodule update --remote protobufs
|
git submodule update --remote protobufs
|
||||||
|
|
||||||
- name: Download nanopb
|
- name: Download nanopb
|
||||||
run: |
|
run: |
|
||||||
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8-linux-x86.tar.gz
|
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.9.1-linux-x86.tar.gz
|
||||||
tar xvzf nanopb-0.4.8-linux-x86.tar.gz
|
tar xvzf nanopb-0.4.9.1-linux-x86.tar.gz
|
||||||
mv nanopb-0.4.8-linux-x86 nanopb-0.4.8
|
mv nanopb-0.4.9.1-linux-x86 nanopb-0.4.9
|
||||||
|
|
||||||
- name: Re-generate protocol buffers
|
- name: Re-generate protocol buffers
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,6 +1,8 @@
|
|||||||
.pio
|
.pio
|
||||||
main/configuration.h
|
pio
|
||||||
main/credentials.h
|
pio.tar
|
||||||
|
web
|
||||||
|
web.tar
|
||||||
|
|
||||||
# ignore vscode IDE settings files
|
# ignore vscode IDE settings files
|
||||||
.vscode/*
|
.vscode/*
|
||||||
@@ -10,6 +12,9 @@ main/credentials.h
|
|||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
|
.platformio
|
||||||
|
.local
|
||||||
|
.cache
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|||||||
@@ -1,36 +1,37 @@
|
|||||||
version: 0.1
|
version: 0.1
|
||||||
cli:
|
cli:
|
||||||
version: 1.22.5
|
version: 1.22.8
|
||||||
plugins:
|
plugins:
|
||||||
sources:
|
sources:
|
||||||
- id: trunk
|
- id: trunk
|
||||||
ref: v1.6.2
|
ref: v1.6.6
|
||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- trufflehog@3.82.5
|
- prettier@3.4.2
|
||||||
|
- trufflehog@3.86.1
|
||||||
- yamllint@1.35.1
|
- yamllint@1.35.1
|
||||||
- bandit@1.7.10
|
- bandit@1.8.0
|
||||||
- checkov@3.2.255
|
- checkov@3.2.334
|
||||||
- terrascan@1.19.1
|
- terrascan@1.19.9
|
||||||
- trivy@0.55.2
|
- trivy@0.58.0
|
||||||
#- trufflehog@3.63.2-rc0
|
#- trufflehog@3.63.2-rc0
|
||||||
- taplo@0.9.3
|
- taplo@0.9.3
|
||||||
- ruff@0.6.7
|
- ruff@0.8.3
|
||||||
- isort@5.13.2
|
- isort@5.13.2
|
||||||
- markdownlint@0.42.0
|
- markdownlint@0.43.0
|
||||||
- oxipng@9.1.2
|
- oxipng@9.1.3
|
||||||
- svgo@3.3.2
|
- svgo@3.3.2
|
||||||
- actionlint@1.7.2
|
- actionlint@1.7.4
|
||||||
- flake8@7.1.1
|
- flake8@7.1.1
|
||||||
- hadolint@2.12.0
|
- hadolint@2.12.1-beta
|
||||||
- shfmt@3.6.0
|
- shfmt@3.6.0
|
||||||
- shellcheck@0.10.0
|
- shellcheck@0.10.0
|
||||||
- black@24.8.0
|
- black@24.10.0
|
||||||
- git-diff-check
|
- git-diff-check
|
||||||
- gitleaks@8.19.2
|
- gitleaks@8.21.2
|
||||||
- clang-format@16.0.3
|
- clang-format@16.0.3
|
||||||
- prettier@3.3.3
|
#- prettier@3.3.3
|
||||||
ignore:
|
ignore:
|
||||||
- linters: [ALL]
|
- linters: [ALL]
|
||||||
paths:
|
paths:
|
||||||
@@ -39,7 +40,7 @@ runtimes:
|
|||||||
enabled:
|
enabled:
|
||||||
- python@3.10.8
|
- python@3.10.8
|
||||||
- go@1.21.0
|
- go@1.21.0
|
||||||
- node@18.12.1
|
- node@18.20.5
|
||||||
actions:
|
actions:
|
||||||
disabled:
|
disabled:
|
||||||
- trunk-announce
|
- trunk-announce
|
||||||
|
|||||||
4
CODE_OF_CONDUCT.md
Normal file
4
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
The Meshtastic Firmware project is subject to the code of conduct for the parent project, which can be found here:
|
||||||
|
https://meshtastic.org/docs/legal/conduct/
|
||||||
73
Dockerfile
73
Dockerfile
@@ -1,32 +1,29 @@
|
|||||||
FROM debian:bookworm-slim AS builder
|
# trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue
|
||||||
|
# trunk-ignore-all(hadolint/DL3008): Use latest version of apt packages for buildchain
|
||||||
|
# trunk-ignore-all(trivy/DS002): We must run as root for this container
|
||||||
|
# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container
|
||||||
|
# trunk-ignore-all(hadolint/DL3002): We must run as root for this container
|
||||||
|
|
||||||
|
FROM python:3.12-bookworm AS builder
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Etc/UTC
|
ENV TZ=Etc/UTC
|
||||||
|
|
||||||
# http://bugs.python.org/issue19846
|
# Install Dependencies
|
||||||
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
ENV LANG C.UTF-8
|
RUN apt-get update && apt-get install --no-install-recommends -y wget g++ zip git ca-certificates \
|
||||||
|
libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev \
|
||||||
# Install build deps
|
libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config && \
|
||||||
USER root
|
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
|
pip install --no-cache-dir -U platformio==6.1.16 && \
|
||||||
# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue
|
mkdir /tmp/firmware
|
||||||
# trunk-ignore(hadolint/DL3008): Use latest version of packages for buildchain
|
|
||||||
RUN apt-get update && apt-get install --no-install-recommends -y wget python3 python3-pip python3-wheel python3-venv g++ zip git \
|
|
||||||
ca-certificates libgpiod-dev libyaml-cpp-dev libbluetooth-dev \
|
|
||||||
libulfius-dev liborcania-dev libssl-dev pkg-config && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* && mkdir /tmp/firmware
|
|
||||||
|
|
||||||
RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh && chown mesh:mesh /tmp/firmware
|
|
||||||
USER mesh
|
|
||||||
|
|
||||||
|
# Copy source code
|
||||||
WORKDIR /tmp/firmware
|
WORKDIR /tmp/firmware
|
||||||
RUN python3 -m venv /tmp/firmware
|
COPY . /tmp/firmware
|
||||||
RUN bash -o pipefail -c "source bin/activate; pip3 install --no-cache-dir -U platformio==6.1.15"
|
|
||||||
# trunk-ignore(terrascan/AC_DOCKER_00024): We would actually like these files to be owned by mesh tyvm
|
# Build
|
||||||
COPY --chown=mesh:mesh . /tmp/firmware
|
RUN bash ./bin/build-native.sh && \
|
||||||
RUN bash -o pipefail -c "source ./bin/activate && bash ./bin/build-native.sh"
|
cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd"
|
||||||
RUN cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd"
|
|
||||||
|
|
||||||
|
|
||||||
##### PRODUCTION BUILD #############
|
##### PRODUCTION BUILD #############
|
||||||
@@ -35,20 +32,26 @@ FROM debian:bookworm-slim
|
|||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Etc/UTC
|
ENV TZ=Etc/UTC
|
||||||
|
|
||||||
# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue
|
# nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root
|
||||||
# trunk-ignore(hadolint/DL3008): Use latest version of packages for buildchain
|
USER root
|
||||||
RUN apt-get update && apt-get --no-install-recommends -y install libc-bin libc6 libgpiod2 libyaml-cpp0.7 libulfius2.7 liborcania2.3 libssl3 && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
|
RUN apt-get update && apt-get --no-install-recommends -y install libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libulfius2.7 libusb-1.0-0-dev liborcania2.3 libssl3 && \
|
||||||
USER mesh
|
apt-get clean && rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& mkdir -p /var/lib/meshtasticd \
|
||||||
|
&& mkdir -p /etc/meshtasticd/config.d \
|
||||||
|
&& mkdir -p /etc/meshtasticd/ssl
|
||||||
|
|
||||||
WORKDIR /home/mesh
|
# Fetch compiled binary from the builder
|
||||||
COPY --from=builder /tmp/firmware/release/meshtasticd /home/mesh/
|
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/
|
||||||
|
# Copy config templates
|
||||||
|
COPY ./bin/config.d /etc/meshtasticd/available.d
|
||||||
|
|
||||||
RUN mkdir data
|
WORKDIR /var/lib/meshtasticd
|
||||||
VOLUME /home/mesh/data
|
VOLUME /var/lib/meshtasticd
|
||||||
|
|
||||||
CMD [ "sh", "-cx", "./meshtasticd -d /home/mesh/data --hwid=${HWID:-$RANDOM}" ]
|
# Expose Meshtastic TCP API port from the host
|
||||||
|
EXPOSE 4403
|
||||||
|
|
||||||
HEALTHCHECK NONE
|
CMD [ "sh", "-cx", "meshtasticd -d /var/lib/meshtasticd" ]
|
||||||
|
|
||||||
|
HEALTHCHECK NONE
|
||||||
43
alpine.Dockerfile
Normal file
43
alpine.Dockerfile
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# trunk-ignore-all(trivy/DS002): We must run as root for this container
|
||||||
|
# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container
|
||||||
|
# trunk-ignore-all(hadolint/DL3002): We must run as root for this container
|
||||||
|
|
||||||
|
FROM python:3.12-alpine3.21 AS builder
|
||||||
|
|
||||||
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
|
RUN apk add bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \
|
||||||
|
libusb-dev i2c-tools-dev openssl-dev pkgconf argp-standalone && \
|
||||||
|
pip install --no-cache-dir -U platformio==6.1.16 && \
|
||||||
|
mkdir /tmp/firmware
|
||||||
|
|
||||||
|
WORKDIR /tmp/firmware
|
||||||
|
COPY . /tmp/firmware
|
||||||
|
|
||||||
|
# Create small package (no debugging symbols)
|
||||||
|
# Add `argp` for musl
|
||||||
|
ENV PLATFORMIO_BUILD_FLAGS="-Os -ffunction-sections -fdata-sections -Wl,--gc-sections -largp"
|
||||||
|
|
||||||
|
RUN bash ./bin/build-native.sh && \
|
||||||
|
cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd"
|
||||||
|
|
||||||
|
# ##### PRODUCTION BUILD #############
|
||||||
|
|
||||||
|
FROM alpine:3.21
|
||||||
|
|
||||||
|
# nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN apk add libstdc++ libgpiod yaml-cpp libusb i2c-tools \
|
||||||
|
&& mkdir -p /var/lib/meshtasticd \
|
||||||
|
&& mkdir -p /etc/meshtasticd/config.d \
|
||||||
|
&& mkdir -p /etc/meshtasticd/ssl
|
||||||
|
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/
|
||||||
|
|
||||||
|
WORKDIR /var/lib/meshtasticd
|
||||||
|
VOLUME /var/lib/meshtasticd
|
||||||
|
|
||||||
|
EXPOSE 4403
|
||||||
|
|
||||||
|
CMD [ "sh", "-cx", "meshtasticd --fsdir=/var/lib/meshtasticd" ]
|
||||||
|
|
||||||
|
HEALTHCHECK NONE
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
[esp32_base]
|
[esp32_base]
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
custom_esp32_kind = esp32
|
custom_esp32_kind = esp32
|
||||||
platform = platformio/espressif32@6.7.0
|
platform = platformio/espressif32@6.9.0
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
||||||
@@ -31,7 +31,7 @@ build_flags =
|
|||||||
-DCONFIG_BT_NIMBLE_ENABLED
|
-DCONFIG_BT_NIMBLE_ENABLED
|
||||||
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
|
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
|
||||||
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
|
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
|
||||||
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=5120
|
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
|
||||||
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
|
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
|
||||||
-DSERIAL_BUFFER_SIZE=4096
|
-DSERIAL_BUFFER_SIZE=4096
|
||||||
-DLIBPAX_ARDUINO
|
-DLIBPAX_ARDUINO
|
||||||
@@ -43,10 +43,11 @@ lib_deps =
|
|||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
||||||
${environmental_base.lib_deps}
|
${environmental_base.lib_deps}
|
||||||
|
${radiolib_base.lib_deps}
|
||||||
https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2
|
https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2
|
||||||
h2zero/NimBLE-Arduino@^1.4.2
|
h2zero/NimBLE-Arduino@^1.4.2
|
||||||
https://github.com/dbSuS/libpax.git#7bcd3fcab75037505be9b122ab2b24cc5176b587
|
https://github.com/dbinfrago/libpax.git#3cdc0371c375676a97967547f4065607d4c53fd1
|
||||||
https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
|
lewisxhe/XPowersLib@^0.2.6
|
||||||
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
|
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
|
||||||
rweather/Crypto@^0.4.0
|
rweather/Crypto@^0.4.0
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ lib_deps =
|
|||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
||||||
${environmental_base.lib_deps}
|
${environmental_base.lib_deps}
|
||||||
https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
|
${radiolib_base.lib_deps}
|
||||||
|
lewisxhe/XPowersLib@^0.2.6
|
||||||
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
|
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
|
||||||
rweather/Crypto@^0.4.0
|
rweather/Crypto@^0.4.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
[nrf52_base]
|
[nrf52_base]
|
||||||
; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files
|
; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files
|
||||||
platform = platformio/nordicnrf52@^10.5.0
|
platform = platformio/nordicnrf52@^10.7.0
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform_packages =
|
platform_packages =
|
||||||
; our custom Git version until they merge our PR
|
; our custom Git version until they merge our PR
|
||||||
framework-arduinoadafruitnrf52 @ https://github.com/geeksville/Adafruit_nRF52_Arduino.git
|
framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino.git#e13f5820002a4fb2a5e6754b42ace185277e5adf
|
||||||
|
toolchain-gccarmnoneeabi@~1.90301.0
|
||||||
|
|
||||||
build_type = debug
|
build_type = debug
|
||||||
build_flags =
|
build_flags =
|
||||||
@@ -14,13 +15,18 @@ build_flags =
|
|||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
-Isrc/platform/nrf52
|
-Isrc/platform/nrf52
|
||||||
-DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
|
-DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
|
||||||
|
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
||||||
|
-DMAX_NUM_NODES=80
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
||||||
|
|
||||||
lib_deps=
|
lib_deps=
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
|
${radiolib_base.lib_deps}
|
||||||
rweather/Crypto@^0.4.0
|
rweather/Crypto@^0.4.0
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
BluetoothOTA
|
BluetoothOTA
|
||||||
|
lvgl
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
|
; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated).
|
||||||
[portduino_base]
|
[portduino_base]
|
||||||
platform = https://github.com/meshtastic/platform-native.git#6b3796d697481c8f6e3f4aa5c111bd9979f29e64
|
platform = https://github.com/meshtastic/platform-native.git#562d189828f09fbf4c4093b3c0104bae9d8e9ff9
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
@@ -23,8 +23,10 @@ build_src_filter =
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
${networking_base.lib_deps}
|
${networking_base.lib_deps}
|
||||||
|
${radiolib_base.lib_deps}
|
||||||
rweather/Crypto@^0.4.0
|
rweather/Crypto@^0.4.0
|
||||||
https://github.com/lovyan03/LovyanGFX.git#5a39989aa2c9492572255b22f033843ec8900233
|
lovyan03/LovyanGFX@^1.2.0
|
||||||
|
https://github.com/pine64/libch341-spi-userspace#a9b17e3452f7fb747000d9b4ad4409155b39f6ef
|
||||||
|
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags}
|
${arduino_base.build_flags}
|
||||||
@@ -32,6 +34,10 @@ build_flags =
|
|||||||
-Isrc/platform/portduino
|
-Isrc/platform/portduino
|
||||||
-DRADIOLIB_EEPROM_UNSUPPORTED
|
-DRADIOLIB_EEPROM_UNSUPPORTED
|
||||||
-DPORTDUINO_LINUX_HARDWARE
|
-DPORTDUINO_LINUX_HARDWARE
|
||||||
|
-lpthread
|
||||||
|
-lstdc++fs
|
||||||
-lbluetooth
|
-lbluetooth
|
||||||
-lgpiod
|
-lgpiod
|
||||||
-lyaml-cpp
|
-lyaml-cpp
|
||||||
|
-li2c
|
||||||
|
-std=c++17
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
; Common settings for rp2040 Processor based targets
|
; Common settings for rp2040 Processor based targets
|
||||||
[rp2040_base]
|
[rp2040_base]
|
||||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#60d6ae81fcc73c34b1493ca9e261695e471bc0c2
|
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#19e30129fb1428b823be585c787dcb4ac0d9014c ; For arduino-pico >=4.2.1
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#3.7.2
|
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#6024e9a7e82a72e38dd90f42029ba3748835eb2e ; 4.3.0 with fix MDNS
|
||||||
|
|
||||||
board_build.core = earlephilhower
|
board_build.core = earlephilhower
|
||||||
board_build.filesystem_size = 0.5m
|
board_build.filesystem_size = 0.5m
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags} -Wno-unused-variable -Wcast-align
|
${arduino_base.build_flags} -Wno-unused-variable -Wcast-align
|
||||||
-Isrc/platform/rp2xx0
|
-Isrc/platform/rp2xx0
|
||||||
|
-Isrc/platform/rp2xx0/hardware_rosc/include
|
||||||
|
-Isrc/platform/rp2xx0/pico_sleep/include
|
||||||
-D__PLAT_RP2040__
|
-D__PLAT_RP2040__
|
||||||
# -D _POSIX_THREADS
|
# -D _POSIX_THREADS
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
@@ -20,4 +22,5 @@ lib_ignore =
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
${environmental_base.lib_deps}
|
${environmental_base.lib_deps}
|
||||||
|
${radiolib_base.lib_deps}
|
||||||
rweather/Crypto
|
rweather/Crypto
|
||||||
@@ -1,23 +1,25 @@
|
|||||||
; Common settings for rp2040 Processor based targets
|
; Common settings for rp2040 Processor based targets
|
||||||
[rp2350_base]
|
[rp2350_base]
|
||||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#9e55f6db5c56b9867c69fe473f388beea4546672
|
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#19e30129fb1428b823be585c787dcb4ac0d9014c ; For arduino-pico >=4.2.1
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#a6ab6e1f95bc1428d667d55ea7173c0744acc03c ; 4.0.2+
|
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#6024e9a7e82a72e38dd90f42029ba3748835eb2e ; 4.3.0 with fix MDNS
|
||||||
|
|
||||||
board_build.core = earlephilhower
|
board_build.core = earlephilhower
|
||||||
board_build.filesystem_size = 0.5m
|
board_build.filesystem_size = 0.5m
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags} -Wno-unused-variable
|
${arduino_base.build_flags} -Wno-unused-variable -Wcast-align
|
||||||
-Isrc/platform/rp2xx0
|
-Isrc/platform/rp2xx0
|
||||||
-D__PLAT_RP2040__
|
-D__PLAT_RP2350__
|
||||||
# -D _POSIX_THREADS
|
# -D _POSIX_THREADS
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<modules/esp32> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> -<mesh/wifi/> -<mesh/http/> -<mesh/raspihttp>
|
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<modules/esp32> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> -<mesh/wifi/> -<mesh/http/> -<mesh/raspihttp> -<platform/rp2xx0/pico_sleep> -<platform/rp2xx0/hardware_rosc>
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
BluetoothOTA
|
BluetoothOTA
|
||||||
|
lvgl
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
${environmental_base.lib_deps}
|
${environmental_base.lib_deps}
|
||||||
|
${radiolib_base.lib_deps}
|
||||||
rweather/Crypto
|
rweather/Crypto
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[stm32_base]
|
[stm32_base]
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform = ststm32
|
platform = ststm32
|
||||||
platform_packages = platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32.git#361a7fdb67e2a7104e99b4f42a802469eef8b129
|
platform_packages = platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32.git#ea74156acd823b6d14739f389e6cdc648f8ee36e
|
||||||
|
|
||||||
build_type = release
|
build_type = release
|
||||||
|
|
||||||
@@ -30,8 +30,9 @@ upload_protocol = stlink
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
charlesbaynham/OSFS@^1.2.3
|
charlesbaynham/OSFS@^1.2.3
|
||||||
|
jgromes/RadioLib@7.0.2
|
||||||
https://github.com/caveman99/Crypto.git#f61ae26a53f7a2d0ba5511625b8bf8eff3a35d5e
|
https://github.com/caveman99/Crypto.git#f61ae26a53f7a2d0ba5511625b8bf8eff3a35d5e
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
https://github.com/mathertel/OneButton@~2.6.1
|
mathertel/OneButton@2.6.1
|
||||||
Wire
|
Wire
|
||||||
1
bin/.gitignore
vendored
Normal file
1
bin/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
config.yaml
|
||||||
33
bin/base64_to_hex.py
Normal file
33
bin/base64_to_hex.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import sys
|
||||||
|
import base64
|
||||||
|
|
||||||
|
def base64_to_hex_string(b64_string):
|
||||||
|
try:
|
||||||
|
# Decode the Base64 string to raw bytes
|
||||||
|
decoded_bytes = base64.b64decode(b64_string)
|
||||||
|
except Exception as e:
|
||||||
|
raise ValueError(f"Invalid Base64 input: {e}")
|
||||||
|
|
||||||
|
# Check if the decoded result is exactly 32 bytes
|
||||||
|
if len(decoded_bytes) != 32:
|
||||||
|
raise ValueError("Decoded Base64 input must be exactly 32 bytes.")
|
||||||
|
|
||||||
|
# Convert each byte to its hex representation
|
||||||
|
hex_values = [f"0x{byte:02x}" for byte in decoded_bytes]
|
||||||
|
|
||||||
|
# Join the formatted hex values with commas
|
||||||
|
formatted_output = "{ " + ", ".join(hex_values) + " };"
|
||||||
|
return formatted_output
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
# Check if a Base64 string was provided in command line arguments
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
print("Usage: python script.py <base64-string>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
b64_string = sys.argv[1]
|
||||||
|
try:
|
||||||
|
formatted_hex = base64_to_hex_string(b64_string)
|
||||||
|
print(formatted_hex)
|
||||||
|
except ValueError as e:
|
||||||
|
print(e)
|
||||||
@@ -35,6 +35,11 @@ cp $SRCBIN $OUTDIR/$basename-update.bin
|
|||||||
|
|
||||||
echo "Building Filesystem for ESP32 targets"
|
echo "Building Filesystem for ESP32 targets"
|
||||||
pio run --environment $1 -t buildfs
|
pio run --environment $1 -t buildfs
|
||||||
|
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefswebui-$VERSION.bin
|
||||||
|
# Remove webserver files from the filesystem and rebuild
|
||||||
|
ls -l data/static # Diagnostic list of files
|
||||||
|
rm -rf data/static
|
||||||
|
pio run --environment $1 -t buildfs
|
||||||
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefs-$VERSION.bin
|
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefs-$VERSION.bin
|
||||||
cp bin/device-install.* $OUTDIR
|
cp bin/device-install.* $OUTDIR
|
||||||
cp bin/device-update.* $OUTDIR
|
cp bin/device-update.* $OUTDIR
|
||||||
|
|||||||
18
bin/build-firmware.sh
Normal file
18
bin/build-firmware.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
sed -i 's/#-DBUILD_EPOCH=$UNIX_TIME/-DBUILD_EPOCH=$UNIX_TIME/' platformio.ini
|
||||||
|
|
||||||
|
export PIP_BREAK_SYSTEM_PACKAGES=1
|
||||||
|
|
||||||
|
if (echo $2 | grep -q "esp32"); then
|
||||||
|
bin/build-esp32.sh $1
|
||||||
|
elif (echo $2 | grep -q "nrf52"); then
|
||||||
|
bin/build-nrf52.sh $1
|
||||||
|
elif (echo $2 | grep -q "stm32"); then
|
||||||
|
bin/build-stm32.sh $1
|
||||||
|
elif (echo $2 | grep -q "rpi2040"); then
|
||||||
|
bin/build-rpi2040.sh $1
|
||||||
|
else
|
||||||
|
echo "Unknown target $2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -27,5 +27,4 @@ rm -r $OUTDIR/* || true
|
|||||||
platformio pkg update --environment native || platformioFailed
|
platformio pkg update --environment native || platformioFailed
|
||||||
pio run --environment native || platformioFailed
|
pio run --environment native || platformioFailed
|
||||||
cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(uname -m)"
|
cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(uname -m)"
|
||||||
cp bin/device-install.* $OUTDIR
|
cp bin/native-install.* $OUTDIR
|
||||||
cp bin/device-update.* $OUTDIR
|
|
||||||
|
|||||||
48
bin/build-userprefs-json.py
Normal file
48
bin/build-userprefs-json.py
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
import re
|
||||||
|
|
||||||
|
def get_macros_from_header(header_file):
|
||||||
|
# Run clang to preprocess the header file and capture the output
|
||||||
|
result = subprocess.run(['clang', '-E', '-dM', header_file], capture_output=True, text=True)
|
||||||
|
if result.returncode != 0:
|
||||||
|
raise RuntimeError(f"Clang preprocessing failed: {result.stderr}")
|
||||||
|
|
||||||
|
# Extract macros from the output
|
||||||
|
macros = {}
|
||||||
|
macro_pattern = re.compile(r'#define\s+(\w+)\s+(.*)')
|
||||||
|
for line in result.stdout.splitlines():
|
||||||
|
match = macro_pattern.match(line)
|
||||||
|
if match and 'USERPREFS_' in line and '_USERPREFS_' not in line:
|
||||||
|
macros[match.group(1)] = match.group(2)
|
||||||
|
|
||||||
|
return macros
|
||||||
|
|
||||||
|
def write_macros_to_json(macros, output_file):
|
||||||
|
with open(output_file, 'w') as f:
|
||||||
|
json.dump(macros, f, indent=4)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
header_file = 'userPrefs.h'
|
||||||
|
output_file = 'userPrefs.jsonc'
|
||||||
|
# Uncomment all macros in the header file
|
||||||
|
with open(header_file, 'r') as file:
|
||||||
|
lines = file.readlines()
|
||||||
|
|
||||||
|
uncommented_lines = []
|
||||||
|
for line in lines:
|
||||||
|
stripped_line = line.strip().replace('/*', '').replace('*/', '')
|
||||||
|
if stripped_line.startswith('//') and 'USERPREFS_' in stripped_line:
|
||||||
|
# Replace "//"
|
||||||
|
stripped_line = stripped_line.replace('//', '')
|
||||||
|
uncommented_lines.append(stripped_line + '\n')
|
||||||
|
|
||||||
|
with open(header_file, 'w') as file:
|
||||||
|
for line in uncommented_lines:
|
||||||
|
file.write(line)
|
||||||
|
macros = get_macros_from_header(header_file)
|
||||||
|
write_macros_to_json(macros, output_file)
|
||||||
|
print(f"Macros have been written to {output_file}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -1,33 +1,17 @@
|
|||||||
|
### Many device configs have been moved to /etc/meshtasticd/available.d
|
||||||
|
### To activate, simply copy or link the appropriate file into /etc/meshtasticd/config.d
|
||||||
|
|
||||||
### Define your devices here using Broadcom pin numbering
|
### Define your devices here using Broadcom pin numbering
|
||||||
### Uncomment the block that corresponds to your hardware
|
### Uncomment the block that corresponds to your hardware
|
||||||
### Including the "Module:" line!
|
### Including the "Module:" line!
|
||||||
---
|
---
|
||||||
Lora:
|
Lora:
|
||||||
# Module: sx1262 # Waveshare SX126X XXXM
|
|
||||||
# DIO2_AS_RF_SWITCH: true
|
|
||||||
# CS: 21
|
|
||||||
# IRQ: 16
|
|
||||||
# Busy: 20
|
|
||||||
# Reset: 18
|
|
||||||
# SX126X_ANT_SW: 6
|
|
||||||
|
|
||||||
# Module: sx1262 # Waveshare SX1302 LISTEN ONLY AT THIS TIME!
|
# Module: sx1262 # Waveshare SX1302 LISTEN ONLY AT THIS TIME!
|
||||||
# CS: 7
|
# CS: 7
|
||||||
# IRQ: 17
|
# IRQ: 17
|
||||||
# Reset: 22
|
# Reset: 22
|
||||||
|
|
||||||
# Module: sx1262 # pinedio
|
|
||||||
# CS: 0
|
|
||||||
# IRQ: 10
|
|
||||||
# Busy: 11
|
|
||||||
# spidev: spidev0.1
|
|
||||||
|
|
||||||
# Module: RF95 # Adafruit RFM9x
|
|
||||||
# Reset: 25
|
|
||||||
# CS: 7
|
|
||||||
# IRQ: 22
|
|
||||||
# Busy: 23
|
|
||||||
|
|
||||||
# Module: RF95 # Elecrow Lora RFM95 IOT https://www.elecrow.com/lora-rfm95-iot-board-for-rpi.html
|
# Module: RF95 # Elecrow Lora RFM95 IOT https://www.elecrow.com/lora-rfm95-iot-board-for-rpi.html
|
||||||
# Reset: 22
|
# Reset: 22
|
||||||
# CS: 7
|
# CS: 7
|
||||||
@@ -39,6 +23,47 @@ Lora:
|
|||||||
# Busy: 20
|
# Busy: 20
|
||||||
# Reset: 18
|
# Reset: 18
|
||||||
|
|
||||||
|
### The Radxa Zero 3E/W employs multiple gpio chips.
|
||||||
|
### Each gpio pin must be unique, but can be assigned to a specific gpio chip and line.
|
||||||
|
### In case solely a no. is given, the default gpio chip and pin == line will be employed.
|
||||||
|
###
|
||||||
|
# Module: sx1262 # Radxa Zero 3E/W + Ebyte E22-900M30S
|
||||||
|
# DIO2_AS_RF_SWITCH: true
|
||||||
|
# DIO3_TCXO_VOLTAGE: 1.8
|
||||||
|
# CS: # NSS PIN_24 -> chip 4, line 22
|
||||||
|
# pin: 24
|
||||||
|
# gpiochip: 4
|
||||||
|
# line: 22
|
||||||
|
# SCK: # SCK PIN_23 -> chip 4, line 18
|
||||||
|
# pin: 23
|
||||||
|
# gpiochip: 4
|
||||||
|
# line: 18
|
||||||
|
# Busy: # BUSY PIN_29 -> chip 3!, line 11
|
||||||
|
# pin: 29
|
||||||
|
# gpiochip: 3
|
||||||
|
# line: 11
|
||||||
|
# MOSI: # MOSI PIN_19 -> chip 4, line 19
|
||||||
|
# pin: 19
|
||||||
|
# gpiochip: 4
|
||||||
|
# line: 19
|
||||||
|
# MISO: # MISO PIN_21 -> chip 4, line 21
|
||||||
|
# pin: 21
|
||||||
|
# gpiochip: 4
|
||||||
|
# line: 21
|
||||||
|
# Reset: # NRST PIN_27 -> chip 4, line 10
|
||||||
|
# pin: 27
|
||||||
|
# gpiochip: 4
|
||||||
|
# line: 10
|
||||||
|
# IRQ: # DIO1 PIN_28 -> chip 4, line 11
|
||||||
|
# pin: 28
|
||||||
|
# gpiochip: 4
|
||||||
|
# line: 11
|
||||||
|
# RXen: # RXEN PIN_22 -> chip 3!, line 17
|
||||||
|
# pin: 22
|
||||||
|
# gpiochip: 3
|
||||||
|
# line: 17
|
||||||
|
# TXen: RADIOLIB_NC # TXEN no PIN, no line, fallback to default gpio chip
|
||||||
|
|
||||||
# Module: sx1268 # SX1268-based modules, tested with Ebyte E22 400M33S
|
# Module: sx1268 # SX1268-based modules, tested with Ebyte E22 400M33S
|
||||||
# CS: 21
|
# CS: 21
|
||||||
# IRQ: 16
|
# IRQ: 16
|
||||||
@@ -53,11 +78,11 @@ Lora:
|
|||||||
# TXen: x # TX and RX enable pins
|
# TXen: x # TX and RX enable pins
|
||||||
# RXen: x
|
# RXen: x
|
||||||
|
|
||||||
# ch341_quirk: true # Uncomment this to use the chunked SPI transfer that seems to fix the ch341
|
# SX126X_MAX_POWER: 8 # Limit the output power to 8 dBm, useful for amped nodes
|
||||||
|
|
||||||
# spiSpeed: 2000000
|
# spiSpeed: 2000000
|
||||||
|
|
||||||
### Set gpio chip to use in /dev/. Defaults to 0.
|
### Set default/fallback gpio chip to use in /dev/. Defaults to 0.
|
||||||
### Notably the Raspberry Pi 5 puts the GPIO header on gpiochip4
|
### Notably the Raspberry Pi 5 puts the GPIO header on gpiochip4
|
||||||
# gpiochip: 4
|
# gpiochip: 4
|
||||||
|
|
||||||
@@ -84,17 +109,6 @@ I2C:
|
|||||||
|
|
||||||
Display:
|
Display:
|
||||||
|
|
||||||
### Waveshare 2.8inch RPi LCD
|
|
||||||
# Panel: ST7789
|
|
||||||
# CS: 8
|
|
||||||
# DC: 22 # Data/Command pin
|
|
||||||
# Backlight: 18
|
|
||||||
# Width: 240
|
|
||||||
# Height: 320
|
|
||||||
# Reset: 27
|
|
||||||
# Rotate: true
|
|
||||||
# Invert: true
|
|
||||||
|
|
||||||
### Waveshare 1.44inch LCD HAT
|
### Waveshare 1.44inch LCD HAT
|
||||||
# Panel: ST7735S
|
# Panel: ST7735S
|
||||||
# CS: 8 #Chip Select
|
# CS: 8 #Chip Select
|
||||||
@@ -114,6 +128,29 @@ Display:
|
|||||||
# Height: 320
|
# Height: 320
|
||||||
# Rotate: true
|
# Rotate: true
|
||||||
|
|
||||||
|
### SHCHV 3.5 RPi TFT+Touchscreen
|
||||||
|
# Panel: ILI9486
|
||||||
|
# spidev: spidev0.0
|
||||||
|
# BusFrequency: 30000000
|
||||||
|
# DC: 24
|
||||||
|
# Reset: 25
|
||||||
|
# Width: 320
|
||||||
|
# Height: 480
|
||||||
|
# OffsetRotate: 2
|
||||||
|
|
||||||
|
### TZT 2.0 Inch TFT Display ST7789V 240RGBx320
|
||||||
|
# Panel: ST7789
|
||||||
|
# spidev: spidev0.0
|
||||||
|
# # CS: 8 # can be freely chosen
|
||||||
|
# BusFrequency: 80000000
|
||||||
|
# DC: 24 # can be freely chosen
|
||||||
|
# Width: 320
|
||||||
|
# Height: 240
|
||||||
|
# Reset: 25 # can be freely chosen
|
||||||
|
# Rotate: true
|
||||||
|
# OffsetRotate: 1
|
||||||
|
# Invert: true
|
||||||
|
|
||||||
### You can also specify the spi device for the display to use
|
### You can also specify the spi device for the display to use
|
||||||
# spidev: spidev0.0
|
# spidev: spidev0.0
|
||||||
|
|
||||||
@@ -128,10 +165,6 @@ Touchscreen:
|
|||||||
# IRQ: 24
|
# IRQ: 24
|
||||||
# I2CAddr: 0x38
|
# I2CAddr: 0x38
|
||||||
|
|
||||||
# Module: XPT2046 # Waveshare 2.8inch
|
|
||||||
# CS: 7
|
|
||||||
# IRQ: 17
|
|
||||||
|
|
||||||
### You can also specify the spi device for the touchscreen to use
|
### You can also specify the spi device for the touchscreen to use
|
||||||
# spidev: spidev0.0
|
# spidev: spidev0.0
|
||||||
|
|
||||||
@@ -150,8 +183,13 @@ Logging:
|
|||||||
|
|
||||||
Webserver:
|
Webserver:
|
||||||
# Port: 443 # Port for Webserver & Webservices
|
# Port: 443 # Port for Webserver & Webservices
|
||||||
# RootPath: /usr/share/doc/meshtasticd/web # Root Dir of WebServer
|
# RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer
|
||||||
|
# SSLKey: /etc/meshtasticd/ssl/private_key.pem # Path to SSL Key, generated if not present
|
||||||
|
# SSLCert: /etc/meshtasticd/ssl/certificate.pem # Path to SSL Certificate, generated if not present
|
||||||
|
|
||||||
General:
|
General:
|
||||||
MaxNodes: 200
|
MaxNodes: 200
|
||||||
MaxMessageQueue: 100
|
MaxMessageQueue: 100
|
||||||
|
ConfigDirectory: /etc/meshtasticd/config.d/
|
||||||
|
# MACAddress: AA:BB:CC:DD:EE:FF
|
||||||
|
# MACAddressSource: eth0
|
||||||
9
bin/config.d/OpenWRT/BananaPi-BPI-R4-sx1262.yaml
Normal file
9
bin/config.d/OpenWRT/BananaPi-BPI-R4-sx1262.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Lora:
|
||||||
|
Module: sx1262 # BananaPi-BPI-R4 SPI via 26p GPIO Header
|
||||||
|
## CS: 28
|
||||||
|
IRQ: 50
|
||||||
|
Busy: 62
|
||||||
|
Reset: 51
|
||||||
|
spidev: spidev1.0
|
||||||
|
DIO2_AS_RF_SWITCH: true
|
||||||
|
DIO3_TCXO_VOLTAGE: true
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
## https://www.mikroe.com/lr-iot-click
|
||||||
|
Lora:
|
||||||
|
Module: lr1110 # OpenWRT ONE mikroBUS with LR-IOT-CLICK
|
||||||
|
# CS: 25
|
||||||
|
IRQ: 10
|
||||||
|
Busy: 12
|
||||||
|
# Reset: 2
|
||||||
|
spidev: spidev2.0
|
||||||
|
DIO3_TCXO_VOLTAGE: 1.6
|
||||||
8
bin/config.d/OpenWRT/OpenWRT_One_mikroBUS_sx1262.yaml
Normal file
8
bin/config.d/OpenWRT/OpenWRT_One_mikroBUS_sx1262.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Lora:
|
||||||
|
Module: sx1262
|
||||||
|
IRQ: 10
|
||||||
|
Busy: 12
|
||||||
|
# Reset: 2
|
||||||
|
spidev: spidev2.0
|
||||||
|
DIO2_AS_RF_SWITCH: true
|
||||||
|
DIO3_TCXO_VOLTAGE: true
|
||||||
18
bin/config.d/display-waveshare-2.8.yaml
Normal file
18
bin/config.d/display-waveshare-2.8.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
Display:
|
||||||
|
|
||||||
|
### Waveshare 2.8inch RPi LCD
|
||||||
|
Panel: ST7789
|
||||||
|
CS: 8
|
||||||
|
DC: 22 # Data/Command pin
|
||||||
|
Backlight: 18
|
||||||
|
Width: 240
|
||||||
|
Height: 320
|
||||||
|
Reset: 27
|
||||||
|
Rotate: true
|
||||||
|
Invert: true
|
||||||
|
|
||||||
|
Touchscreen:
|
||||||
|
### Note, at least for now, the touchscreen must have a CS pin defined, even if you let Linux manage the CS switching.
|
||||||
|
Module: XPT2046 # Waveshare 2.8inch
|
||||||
|
CS: 7
|
||||||
|
IRQ: 17
|
||||||
20
bin/config.d/femtofox/femtofox_LR1121_TCXO.yaml
Normal file
20
bin/config.d/femtofox/femtofox_LR1121_TCXO.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
Lora:
|
||||||
|
## Ebyte E80-900M22S
|
||||||
|
## This is a bit experimental
|
||||||
|
##
|
||||||
|
##
|
||||||
|
Module: lr1121
|
||||||
|
gpiochip: 1 # subtract 32 from the gpio numbers
|
||||||
|
DIO3_TCXO_VOLTAGE: 1.8
|
||||||
|
CS: 16 #pin6 / GPIO48 1C0
|
||||||
|
IRQ: 23 #pin17 / GPIO55 1C7
|
||||||
|
Busy: 22 #pin16 / GPIO54 1C6
|
||||||
|
Reset: 25 #pin13 / GPIO57 1D1
|
||||||
|
|
||||||
|
|
||||||
|
spidev: spidev0.0 #pins are (CS=16, CLK=17, MOSI=18, MISO=19)
|
||||||
|
spiSpeed: 2000000
|
||||||
|
|
||||||
|
General:
|
||||||
|
MACAddressSource: eth0
|
||||||
21
bin/config.d/femtofox/femtofox_SX1262_TCXO.yaml
Normal file
21
bin/config.d/femtofox/femtofox_SX1262_TCXO.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
Lora:
|
||||||
|
## Ebyte E22-900M30S, E22-900M22S with or without external RF switching setup
|
||||||
|
## HT-RA62 (Has internal switching, but whatever)
|
||||||
|
## Seeed WIO SX1262 (already has TXEN-DIO2 link, but needs RXEN)
|
||||||
|
## Will work with any module with or without RF switching, and with TCXO
|
||||||
|
Module: sx1262
|
||||||
|
gpiochip: 1 # subtract 32 from the gpio numbers
|
||||||
|
DIO2_AS_RF_SWITCH: true
|
||||||
|
DIO3_TCXO_VOLTAGE: true
|
||||||
|
CS: 16 #pin6 / GPIO48 1C0
|
||||||
|
IRQ: 23 #pin17 / GPIO55 1C7
|
||||||
|
Busy: 22 #pin16 / GPIO54 1C6
|
||||||
|
Reset: 25 #pin13 / GPIO57 1D1
|
||||||
|
RXen: 24 #pin12 / GPIO56 1D0 # Not strictly needed for auto-switching, but why complicate things?
|
||||||
|
# TXen: bridge to DIO2 on E22 module
|
||||||
|
spidev: spidev0.0 #pins are (CS=16, CLK=17, MOSI=18, MISO=19)
|
||||||
|
spiSpeed: 2000000
|
||||||
|
|
||||||
|
General:
|
||||||
|
MACAddressSource: eth0
|
||||||
21
bin/config.d/femtofox/femtofox_SX1262_XTAL.yaml
Normal file
21
bin/config.d/femtofox/femtofox_SX1262_XTAL.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
Lora:
|
||||||
|
## Ebyte E22-900MM22S with no external RF switching setup
|
||||||
|
## Waveshare SX126X XXXM, AI Thinker RA-01SH
|
||||||
|
## Will work with any module with or without RF switching and no TCXO
|
||||||
|
|
||||||
|
Module: sx1262
|
||||||
|
gpiochip: 1 # subtract 32 from the gpio numbers
|
||||||
|
DIO2_AS_RF_SWITCH: true
|
||||||
|
DIO3_TCXO_VOLTAGE: false
|
||||||
|
CS: 16 #pin6 / GPIO48 1C0
|
||||||
|
IRQ: 23 #pin17 / GPIO55 1C7
|
||||||
|
Busy: 22 #pin16 / GPIO54 1C6
|
||||||
|
Reset: 25 #pin13 / GPIO57 1D1
|
||||||
|
RXen: 24 #pin12 / GPIO56 1D0 # Not strictly needed for auto-switching, but why complicate things?
|
||||||
|
# TXen: bridge to DIO2 on E22 module
|
||||||
|
spidev: spidev0.0 #pins are (CS=16, CLK=17, MOSI=18, MISO=19)
|
||||||
|
spiSpeed: 2000000
|
||||||
|
|
||||||
|
General:
|
||||||
|
MACAddressSource: eth0
|
||||||
5
bin/config.d/lora-Adafruit-RFM9x
Normal file
5
bin/config.d/lora-Adafruit-RFM9x
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Module: RF95 # Adafruit RFM9x
|
||||||
|
# Reset: 25
|
||||||
|
# CS: 7
|
||||||
|
# IRQ: 22
|
||||||
|
# Busy: 23
|
||||||
12
bin/config.d/lora-MeshAdv-900M30S.yaml
Normal file
12
bin/config.d/lora-MeshAdv-900M30S.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Lora:
|
||||||
|
Module: sx1262
|
||||||
|
CS: 21
|
||||||
|
IRQ: 16
|
||||||
|
Busy: 20
|
||||||
|
Reset: 18
|
||||||
|
TXen: 13
|
||||||
|
RXen: 12
|
||||||
|
DIO3_TCXO_VOLTAGE: true
|
||||||
|
# Only for E22-900M33S:
|
||||||
|
# Limit the output power to 8 dBm
|
||||||
|
# SX126X_MAX_POWER: 8
|
||||||
11
bin/config.d/lora-meshstick-1262.yaml
Normal file
11
bin/config.d/lora-meshstick-1262.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Lora:
|
||||||
|
Module: sx1262
|
||||||
|
CS: 0
|
||||||
|
IRQ: 6
|
||||||
|
Reset: 2
|
||||||
|
Busy: 4
|
||||||
|
spidev: ch341
|
||||||
|
DIO3_TCXO_VOLTAGE: true
|
||||||
|
# USB_Serialnum: 12345678
|
||||||
|
USB_PID: 0x5512
|
||||||
|
USB_VID: 0x1A86
|
||||||
5
bin/config.d/lora-pinedio-usb-sx1262.yaml
Normal file
5
bin/config.d/lora-pinedio-usb-sx1262.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Lora:
|
||||||
|
Module: sx1262
|
||||||
|
CS: 0
|
||||||
|
IRQ: 10
|
||||||
|
spidev: ch341
|
||||||
8
bin/config.d/lora-waveshare-sxxx.yaml
Normal file
8
bin/config.d/lora-waveshare-sxxx.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Lora:
|
||||||
|
Module: sx1262 # Waveshare SX126X XXXM
|
||||||
|
DIO2_AS_RF_SWITCH: true
|
||||||
|
CS: 21
|
||||||
|
IRQ: 16
|
||||||
|
Busy: 20
|
||||||
|
Reset: 18
|
||||||
|
SX126X_ANT_SW: 6
|
||||||
@@ -1,16 +1,26 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
set PYTHON=python
|
set PYTHON=python
|
||||||
|
set WEB_APP=0
|
||||||
|
|
||||||
|
:: Determine the correct esptool command to use
|
||||||
|
where esptool >nul 2>&1
|
||||||
|
if %ERRORLEVEL% EQU 0 (
|
||||||
|
set "ESPTOOL_CMD=esptool"
|
||||||
|
) else (
|
||||||
|
set "ESPTOOL_CMD=%PYTHON% -m esptool"
|
||||||
|
)
|
||||||
|
|
||||||
goto GETOPTS
|
goto GETOPTS
|
||||||
:HELP
|
:HELP
|
||||||
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME]
|
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME] [--web]
|
||||||
echo Flash image file to device, but first erasing and writing system information
|
echo Flash image file to device, but first erasing and writing system information
|
||||||
echo.
|
echo.
|
||||||
echo -h Display this help and exit
|
echo -h Display this help and exit
|
||||||
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
||||||
echo -f FILENAME The .bin file to flash. Custom to your device type and region.
|
echo -f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
|
echo --web Flash WEB APP.
|
||||||
goto EOF
|
goto EOF
|
||||||
|
|
||||||
:GETOPTS
|
:GETOPTS
|
||||||
@@ -19,37 +29,44 @@ if /I "%1"=="--help" goto HELP
|
|||||||
if /I "%1"=="-F" set "FILENAME=%2" & SHIFT
|
if /I "%1"=="-F" set "FILENAME=%2" & SHIFT
|
||||||
if /I "%1"=="-p" set ESPTOOL_PORT=%2 & SHIFT
|
if /I "%1"=="-p" set ESPTOOL_PORT=%2 & SHIFT
|
||||||
if /I "%1"=="-P" set PYTHON=%2 & SHIFT
|
if /I "%1"=="-P" set PYTHON=%2 & SHIFT
|
||||||
|
if /I "%1"=="--web" set WEB_APP=1 & SHIFT
|
||||||
SHIFT
|
SHIFT
|
||||||
IF NOT "__%1__"=="____" goto GETOPTS
|
IF NOT "__%1__"=="____" goto GETOPTS
|
||||||
|
|
||||||
IF "__%FILENAME%__" == "____" (
|
IF "__%FILENAME%__" == "____" (
|
||||||
echo "Missing FILENAME"
|
echo "Missing FILENAME"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
IF EXIST %FILENAME% IF x%FILENAME:update=%==x%FILENAME% (
|
IF EXIST %FILENAME% IF x%FILENAME:update=%==x%FILENAME% (
|
||||||
echo Trying to flash update %FILENAME%, but first erasing and writing system information"
|
echo Trying to flash update %FILENAME%, but first erasing and writing system information"
|
||||||
%PYTHON% -m esptool --baud 115200 erase_flash
|
%ESPTOOL_CMD% --baud 115200 erase_flash
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x00 %FILENAME%
|
%ESPTOOL_CMD% --baud 115200 write_flash 0x00 %FILENAME%
|
||||||
|
|
||||||
@REM Account for S3 and C3 board's different OTA partition
|
@REM Account for S3 and C3 board's different OTA partition
|
||||||
IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% IF x%FILENAME:t-deck=%==x%FILENAME% IF x%FILENAME:wireless-paper=%==x%FILENAME% IF x%FILENAME:wireless-tracker=%==x%FILENAME% IF x%FILENAME:station-g2=%==x%FILENAME% IF x%FILENAME:unphone=%==x%FILENAME% (
|
IF x%FILENAME:s3=%==x%FILENAME% IF x%FILENAME:v3=%==x%FILENAME% IF x%FILENAME:t-deck=%==x%FILENAME% IF x%FILENAME:wireless-paper=%==x%FILENAME% IF x%FILENAME:wireless-tracker=%==x%FILENAME% IF x%FILENAME:station-g2=%==x%FILENAME% IF x%FILENAME:unphone=%==x%FILENAME% (
|
||||||
IF x%FILENAME:esp32c3=%==x%FILENAME% (
|
IF x%FILENAME:esp32c3=%==x%FILENAME% (
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota.bin
|
%ESPTOOL_CMD% --baud 115200 write_flash 0x260000 bleota.bin
|
||||||
) else (
|
) else (
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-c3.bin
|
%ESPTOOL_CMD% --baud 115200 write_flash 0x260000 bleota-c3.bin
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x260000 bleota-s3.bin
|
%ESPTOOL_CMD% --baud 115200 write_flash 0x260000 bleota-s3.bin
|
||||||
)
|
)
|
||||||
for %%f in (littlefs-*.bin) do (
|
IF %WEB_APP%==1 (
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x300000 %%f
|
for %%f in (littlefswebui-*.bin) do (
|
||||||
|
%ESPTOOL_CMD% --baud 115200 write_flash 0x300000 %%f
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
for %%f in (littlefs-*.bin) do (
|
||||||
|
%ESPTOOL_CMD% --baud 115200 write_flash 0x300000 %%f
|
||||||
|
)
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
|
|
||||||
:EOF
|
:EOF
|
||||||
|
|||||||
@@ -1,22 +1,45 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PYTHON=${PYTHON:-$(which python3 python | head -n 1)}
|
PYTHON=${PYTHON:-$(which python3 python | head -n 1)}
|
||||||
|
WEB_APP=false
|
||||||
|
|
||||||
|
# Determine the correct esptool command to use
|
||||||
|
if "$PYTHON" -m esptool version >/dev/null 2>&1; then
|
||||||
|
ESPTOOL_CMD="$PYTHON -m esptool"
|
||||||
|
elif command -v esptool >/dev/null 2>&1; then
|
||||||
|
ESPTOOL_CMD="esptool"
|
||||||
|
elif command -v esptool.py >/dev/null 2>&1; then
|
||||||
|
ESPTOOL_CMD="esptool.py"
|
||||||
|
else
|
||||||
|
echo "Error: esptool not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Usage info
|
# Usage info
|
||||||
show_help() {
|
show_help() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME]
|
Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME] [--web]
|
||||||
Flash image file to device, but first erasing and writing system information"
|
Flash image file to device, but first erasing and writing system information"
|
||||||
|
|
||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
|
--web Flash WEB APP.
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
# Preprocess long options like --web
|
||||||
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--web)
|
||||||
|
WEB_APP=true
|
||||||
|
shift # Remove this argument from the list
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
while getopts ":hp:P:f:" opt; do
|
while getopts ":hp:P:f:" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
@@ -49,19 +72,23 @@ shift "$((OPTIND - 1))"
|
|||||||
|
|
||||||
if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
|
if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
|
||||||
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
||||||
"$PYTHON" -m esptool erase_flash
|
$ESPTOOL_CMD erase_flash
|
||||||
"$PYTHON" -m esptool write_flash 0x00 ${FILENAME}
|
$ESPTOOL_CMD write_flash 0x00 "${FILENAME}"
|
||||||
# Account for S3 board's different OTA partition
|
# Account for S3 board's different OTA partition
|
||||||
if [ -n "${FILENAME##*"s3"*}" ] && [ -n "${FILENAME##*"-v3"*}" ] && [ -n "${FILENAME##*"t-deck"*}" ] && [ -n "${FILENAME##*"wireless-paper"*}" ] && [ -n "${FILENAME##*"wireless-tracker"*}" ] && [ -n "${FILENAME##*"station-g2"*}" ] && [ -n "${FILENAME##*"unphone"*}" ]; then
|
if [ -n "${FILENAME##*"s3"*}" ] && [ -n "${FILENAME##*"-v3"*}" ] && [ -n "${FILENAME##*"t-deck"*}" ] && [ -n "${FILENAME##*"wireless-paper"*}" ] && [ -n "${FILENAME##*"wireless-tracker"*}" ] && [ -n "${FILENAME##*"station-g2"*}" ] && [ -n "${FILENAME##*"unphone"*}" ]; then
|
||||||
if [ -n "${FILENAME##*"esp32c3"*}" ]; then
|
if [ -n "${FILENAME##*"esp32c3"*}" ]; then
|
||||||
"$PYTHON" -m esptool write_flash 0x260000 bleota.bin
|
$ESPTOOL_CMD write_flash 0x260000 bleota.bin
|
||||||
else
|
else
|
||||||
"$PYTHON" -m esptool write_flash 0x260000 bleota-c3.bin
|
$ESPTOOL_CMD write_flash 0x260000 bleota-c3.bin
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
"$PYTHON" -m esptool write_flash 0x260000 bleota-s3.bin
|
$ESPTOOL_CMD write_flash 0x260000 bleota-s3.bin
|
||||||
|
fi
|
||||||
|
if [ "$WEB_APP" = true ]; then
|
||||||
|
$ESPTOOL_CMD write_flash 0x300000 littlefswebui-*.bin
|
||||||
|
else
|
||||||
|
$ESPTOOL_CMD write_flash 0x300000 littlefs-*.bin
|
||||||
fi
|
fi
|
||||||
"$PYTHON" -m esptool write_flash 0x300000 littlefs-*.bin
|
|
||||||
|
|
||||||
else
|
else
|
||||||
show_help
|
show_help
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
set PYTHON=python
|
set PYTHON=python
|
||||||
|
|
||||||
|
:: Determine the correct esptool command to use
|
||||||
|
where esptool >nul 2>&1
|
||||||
|
if %ERRORLEVEL% EQU 0 (
|
||||||
|
set "ESPTOOL_CMD=esptool"
|
||||||
|
) else (
|
||||||
|
set "ESPTOOL_CMD=%PYTHON% -m esptool"
|
||||||
|
)
|
||||||
|
|
||||||
goto GETOPTS
|
goto GETOPTS
|
||||||
:HELP
|
:HELP
|
||||||
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME]
|
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME]
|
||||||
@@ -24,17 +32,17 @@ IF NOT "__%1__"=="____" goto GETOPTS
|
|||||||
|
|
||||||
IF "__%FILENAME%__" == "____" (
|
IF "__%FILENAME%__" == "____" (
|
||||||
echo "Missing FILENAME"
|
echo "Missing FILENAME"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
IF EXIST %FILENAME% IF NOT x%FILENAME:update=%==x%FILENAME% (
|
IF EXIST %FILENAME% IF NOT x%FILENAME:update=%==x%FILENAME% (
|
||||||
echo Trying to flash update %FILENAME%
|
echo Trying to flash update %FILENAME%
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x10000 %FILENAME%
|
%ESPTOOL_CMD% --baud 115200 write_flash 0x10000 %FILENAME%
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
)
|
)
|
||||||
|
|
||||||
:EOF
|
:EOF
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
PYTHON=${PYTHON:-$(which python3 python|head -n 1)}
|
PYTHON=${PYTHON:-$(which python3 python|head -n 1)}
|
||||||
|
|
||||||
|
# Determine the correct esptool command to use
|
||||||
|
if "$PYTHON" -m esptool version >/dev/null 2>&1; then
|
||||||
|
ESPTOOL_CMD="$PYTHON -m esptool"
|
||||||
|
elif command -v esptool >/dev/null 2>&1; then
|
||||||
|
ESPTOOL_CMD="esptool"
|
||||||
|
elif command -v esptool.py >/dev/null 2>&1; then
|
||||||
|
ESPTOOL_CMD="esptool.py"
|
||||||
|
else
|
||||||
|
echo "Error: esptool not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Usage info
|
# Usage info
|
||||||
show_help() {
|
show_help() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@@ -9,7 +21,7 @@ Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME]
|
|||||||
Flash image file to device, leave existing system intact."
|
Flash image file to device, leave existing system intact."
|
||||||
|
|
||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The *update.bin file to flash. Custom to your device type.
|
-f FILENAME The *update.bin file to flash. Custom to your device type.
|
||||||
|
|
||||||
@@ -30,7 +42,7 @@ while getopts ":hp:P:f:" opt; do
|
|||||||
f) FILENAME=${OPTARG}
|
f) FILENAME=${OPTARG}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid flag."
|
echo "Invalid flag."
|
||||||
show_help >&2
|
show_help >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
@@ -45,7 +57,7 @@ shift "$((OPTIND-1))"
|
|||||||
|
|
||||||
if [ -f "${FILENAME}" ] && [ -z "${FILENAME##*"update"*}" ]; then
|
if [ -f "${FILENAME}" ] && [ -z "${FILENAME##*"update"*}" ]; then
|
||||||
printf "Trying to flash update ${FILENAME}"
|
printf "Trying to flash update ${FILENAME}"
|
||||||
$PYTHON -m esptool --baud 115200 write_flash 0x10000 ${FILENAME}
|
$ESPTOOL_CMD --baud 115200 write_flash 0x10000 ${FILENAME}
|
||||||
else
|
else
|
||||||
show_help
|
show_help
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Meshtastic Native Daemon
|
Description=Meshtastic Native Daemon
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
StartLimitInterval=200
|
||||||
|
StartLimitBurst=5
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/sbin/meshtasticd
|
ExecStart=/usr/sbin/meshtasticd
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
cp "release/meshtasticd_linux_$(uname -m)" /usr/sbin/meshtasticd
|
cp "release/meshtasticd_linux_$(uname -m)" /usr/sbin/meshtasticd
|
||||||
mkdir /etc/meshtasticd
|
mkdir -p /etc/meshtasticd
|
||||||
if [[ -f "/etc/meshtasticd/config.yaml" ]]; then
|
if [[ -f "/etc/meshtasticd/config.yaml" ]]; then
|
||||||
cp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml
|
cp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
# trunk-ignore-all(flake8/F821): For SConstruct imports
|
# trunk-ignore-all(flake8/F821): For SConstruct imports
|
||||||
import sys
|
import sys
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
|
||||||
from readprops import readProps
|
from readprops import readProps
|
||||||
|
|
||||||
@@ -88,12 +90,39 @@ Import("projenv")
|
|||||||
|
|
||||||
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
||||||
verObj = readProps(prefsLoc)
|
verObj = readProps(prefsLoc)
|
||||||
print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"])
|
print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"] + " on " + env.get("PIOENV"))
|
||||||
|
|
||||||
|
jsonLoc = env["PROJECT_DIR"] + "/userPrefs.jsonc"
|
||||||
|
with open(jsonLoc) as f:
|
||||||
|
jsonStr = re.sub("//.*","", f.read(), flags=re.MULTILINE)
|
||||||
|
userPrefs = json.loads(jsonStr)
|
||||||
|
|
||||||
|
pref_flags = []
|
||||||
|
# Pre-process the userPrefs
|
||||||
|
for pref in userPrefs:
|
||||||
|
if userPrefs[pref].startswith("{"):
|
||||||
|
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
|
||||||
|
elif userPrefs[pref].lstrip("-").replace(".", "").isdigit():
|
||||||
|
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
|
||||||
|
elif userPrefs[pref] == "true" or userPrefs[pref] == "false":
|
||||||
|
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
|
||||||
|
elif userPrefs[pref].startswith("meshtastic_"):
|
||||||
|
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
|
||||||
|
# If the value is a string, we need to wrap it in quotes
|
||||||
|
else:
|
||||||
|
pref_flags.append("-D" + pref + "=" + env.StringifyMacro(userPrefs[pref]) + "")
|
||||||
|
|
||||||
# General options that are passed to the C and C++ compilers
|
# General options that are passed to the C and C++ compilers
|
||||||
projenv.Append(
|
flags = [
|
||||||
CCFLAGS=[
|
|
||||||
"-DAPP_VERSION=" + verObj["long"],
|
"-DAPP_VERSION=" + verObj["long"],
|
||||||
"-DAPP_VERSION_SHORT=" + verObj["short"],
|
"-DAPP_VERSION_SHORT=" + verObj["short"],
|
||||||
]
|
"-DAPP_ENV=" + env.get("PIOENV"),
|
||||||
)
|
] + pref_flags
|
||||||
|
|
||||||
|
print ("Using flags:")
|
||||||
|
for flag in flags:
|
||||||
|
print(flag)
|
||||||
|
|
||||||
|
projenv.Append(
|
||||||
|
CCFLAGS=flags,
|
||||||
|
)
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import configparser
|
import configparser
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import os
|
||||||
|
run_number = os.getenv('GITHUB_RUN_NUMBER', '0')
|
||||||
|
build_location = os.getenv('BUILD_LOCATION', 'local')
|
||||||
|
|
||||||
def readProps(prefsLoc):
|
def readProps(prefsLoc):
|
||||||
"""Read the version of our project as a string"""
|
"""Read the version of our project as a string"""
|
||||||
@@ -11,6 +13,7 @@ def readProps(prefsLoc):
|
|||||||
verObj = dict(
|
verObj = dict(
|
||||||
short="{}.{}.{}".format(version["major"], version["minor"], version["build"]),
|
short="{}.{}.{}".format(version["major"], version["minor"], version["build"]),
|
||||||
long="unset",
|
long="unset",
|
||||||
|
deb="unset",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Try to find current build SHA if if the workspace is clean. This could fail if git is not installed
|
# Try to find current build SHA if if the workspace is clean. This could fail if git is not installed
|
||||||
@@ -27,16 +30,16 @@ def readProps(prefsLoc):
|
|||||||
# if isDirty:
|
# if isDirty:
|
||||||
# # short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
# # short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
||||||
# suffix = sha + "-d"
|
# suffix = sha + "-d"
|
||||||
verObj["long"] = "{}.{}.{}.{}".format(
|
verObj["long"] = "{}.{}".format(verObj["short"], suffix)
|
||||||
version["major"], version["minor"], version["build"], suffix
|
verObj["deb"] = "{}.{}~{}{}".format(verObj["short"], run_number, build_location, sha)
|
||||||
)
|
|
||||||
except:
|
except:
|
||||||
# print("Unexpected error:", sys.exc_info()[0])
|
# print("Unexpected error:", sys.exc_info()[0])
|
||||||
# traceback.print_exc()
|
# traceback.print_exc()
|
||||||
verObj["long"] = verObj["short"]
|
verObj["long"] = verObj["short"]
|
||||||
|
verObj["deb"] = "{}.{}~{}".format(verObj["short"], run_number, build_location)
|
||||||
|
|
||||||
# print("firmware version " + verStr)
|
# print("firmware version " + verStr)
|
||||||
return verObj
|
return verObj
|
||||||
|
|
||||||
|
|
||||||
# print("path is" + ','.join(sys.path))
|
# print("path is" + ','.join(sys.path))
|
||||||
@@ -1 +1 @@
|
|||||||
cd protobufs && ..\nanopb-0.4.8\generator-bin\protoc.exe --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:..\src\mesh\generated" -I=..\protobufs\ ..\protobufs\meshtastic\*.proto
|
cd protobufs && ..\nanopb-0.4.9\generator-bin\protoc.exe --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:..\src\mesh\generated" -I=..\protobufs\ ..\protobufs\meshtastic\*.proto
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.8 to be located in the"
|
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.9 to be located in the"
|
||||||
echo "firmware root directory if the following step fails, you should download the correct"
|
echo "firmware root directory if the following step fails, you should download the correct"
|
||||||
echo "prebuilt binaries for your computer into nanopb-0.4.8"
|
echo "prebuilt binaries for your computer into nanopb-0.4.9"
|
||||||
|
|
||||||
# the nanopb tool seems to require that the .options file be in the current directory!
|
# the nanopb tool seems to require that the .options file be in the current directory!
|
||||||
cd protobufs
|
cd protobufs
|
||||||
../nanopb-0.4.8/generator-bin/protoc --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:../src/mesh/generated/" -I=../protobufs meshtastic/*.proto
|
../nanopb-0.4.9/generator-bin/protoc --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:../src/mesh/generated/" -I=../protobufs meshtastic/*.proto
|
||||||
|
|||||||
12
bin/rpkg.macros
Normal file
12
bin/rpkg.macros
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function meshtastic_version {
|
||||||
|
meshtastic_version=$(python3 bin/buildinfo.py short)
|
||||||
|
echo -n "$meshtastic_version"
|
||||||
|
}
|
||||||
|
function git_commits_num {
|
||||||
|
total_commits=$(git rev-list --all --count)
|
||||||
|
echo -n "$total_commits"
|
||||||
|
}
|
||||||
|
function git_commit_sha {
|
||||||
|
commit_sha=$(git rev-parse --short HEAD)
|
||||||
|
echo -n "$commit_sha"
|
||||||
|
}
|
||||||
@@ -28,6 +28,8 @@
|
|||||||
"flash_size": "8MB",
|
"flash_size": "8MB",
|
||||||
"maximum_ram_size": 327680,
|
"maximum_ram_size": 327680,
|
||||||
"maximum_size": 8388608,
|
"maximum_size": 8388608,
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"wait_for_upload_port": true,
|
||||||
"require_upload_port": true,
|
"require_upload_port": true,
|
||||||
"speed": 921600
|
"speed": 921600
|
||||||
},
|
},
|
||||||
|
|||||||
41
boards/esp32-s3-zero.json
Normal file
41
boards/esp32-s3-zero.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"partitions": "default.csv",
|
||||||
|
"memory_type": "qio_qspi"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": [
|
||||||
|
"-DARDUINO_ESP32S3_DEV",
|
||||||
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_EVENT_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
|
"-DBOARD_HAS_PSRAM"
|
||||||
|
],
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "qio",
|
||||||
|
"psram_type": "qio",
|
||||||
|
"hwids": [["0x303A", "0x1001"]],
|
||||||
|
"mcu": "esp32s3",
|
||||||
|
"variant": "esp32s3"
|
||||||
|
},
|
||||||
|
"connectivity": ["wifi", "bluetooth"],
|
||||||
|
"debug": {
|
||||||
|
"default_tool": "esp-builtin",
|
||||||
|
"onboard_tools": ["esp-builtin"],
|
||||||
|
"openocd_target": "esp32s3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino", "espidf"],
|
||||||
|
"platforms": ["espressif32"],
|
||||||
|
"name": "Espressif ESP32-S3-FH4R2 (4 MB QD, 2MB PSRAM)",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "4MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 4194304,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 921600
|
||||||
|
},
|
||||||
|
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html",
|
||||||
|
"vendor": "Espressif"
|
||||||
|
}
|
||||||
41
boards/icarus.json
Normal file
41
boards/icarus.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"ldscript": "esp32s3_out.ld",
|
||||||
|
"memory_type": "qio_opi"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": [
|
||||||
|
"-DBOARD_HAS_PSRAM",
|
||||||
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
|
"-DARDUINO_USB_MODE=0",
|
||||||
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_EVENT_RUNNING_CORE=0"
|
||||||
|
],
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "qio",
|
||||||
|
"hwids": [["0x2886", "0x0059"]],
|
||||||
|
"mcu": "esp32s3",
|
||||||
|
"variant": "icarus"
|
||||||
|
},
|
||||||
|
"connectivity": ["wifi", "bluetooth", "lora"],
|
||||||
|
"debug": {
|
||||||
|
"default_tool": "esp-builtin",
|
||||||
|
"onboard_tools": ["esp-builtin"],
|
||||||
|
"openocd_target": "esp32s3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino", "espidf"],
|
||||||
|
"name": "icarus",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "8MB",
|
||||||
|
"maximum_ram_size": 8388608,
|
||||||
|
"maximum_size": 8388608,
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"wait_for_upload_port": true,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 921600
|
||||||
|
},
|
||||||
|
"url": "https://icarus.azlan.works",
|
||||||
|
"vendor": "Muhammad Shah"
|
||||||
|
}
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s140_v6.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52840_LORA_RELAY_V1 -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [["0x239A", "0x4404"]],
|
|
||||||
"usb_product": "LORA_RELAY",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "lora_relay_v1",
|
|
||||||
"variants_dir": "variants",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "6.1.1",
|
|
||||||
"sd_fwid": "0x00B6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"onboard_tools": ["jlink"],
|
|
||||||
"svd_path": "nrf52840.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "Meshtastic Lora Relay V1 (Adafruit BSP)",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "jlink",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "stlink"]
|
|
||||||
},
|
|
||||||
"url": "https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay",
|
|
||||||
"vendor": "BigCorvus"
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s140_v6.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52840_LORA_RELAY_V2 -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [["0x239A", "0x4406"]],
|
|
||||||
"usb_product": "LORA_RELAY",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "lora_relay_v2",
|
|
||||||
"variants_dir": "variants",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "6.1.1",
|
|
||||||
"sd_fwid": "0x00B6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"onboard_tools": ["jlink"],
|
|
||||||
"svd_path": "nrf52840.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "Meshtastic Lora Relay V1 (Adafruit BSP)",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "jlink",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "stlink"]
|
|
||||||
},
|
|
||||||
"url": "https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay",
|
|
||||||
"vendor": "BigCorvus"
|
|
||||||
}
|
|
||||||
42
boards/mesh-tab.json
Normal file
42
boards/mesh-tab.json
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"ldscript": "esp32s3_out.ld",
|
||||||
|
"partitions": "default_16MB.csv",
|
||||||
|
"memory_type": "qio_qspi"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": [
|
||||||
|
"-DBOARD_HAS_PSRAM",
|
||||||
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
|
"-DARDUINO_USB_MODE=0",
|
||||||
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||||
|
],
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "qio",
|
||||||
|
"hwids": [["0x303A", "0x80D6"]],
|
||||||
|
"mcu": "esp32s3",
|
||||||
|
"variant": "mesh-tab"
|
||||||
|
},
|
||||||
|
"connectivity": ["wifi", "bluetooth", "lora"],
|
||||||
|
"debug": {
|
||||||
|
"default_tool": "esp-builtin",
|
||||||
|
"onboard_tools": ["esp-builtin"],
|
||||||
|
"openocd_target": "esp32s3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino", "espidf"],
|
||||||
|
"name": "ESP32-S3 WROOM-1 N16R2 (16 MB FLASH, 2 MB PSRAM)",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "16MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 16777216,
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"wait_for_upload_port": true,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 460800
|
||||||
|
},
|
||||||
|
"url": "https://github.com/valzzu/Mesh-Tab",
|
||||||
|
"vendor": "Espressif"
|
||||||
|
}
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s113_v7.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [["0x239A", "0x4404"]],
|
|
||||||
"usb_product": "nrf52840dk",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "pca10056-rc-clock",
|
|
||||||
"variants_dir": "variants",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "6.1.1",
|
|
||||||
"sd_fwid": "0x00B6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"onboard_tools": ["jlink"],
|
|
||||||
"svd_path": "nrf52840.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "A modified NRF52840-DK devboard (Adafruit BSP)",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "jlink",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "stlink"]
|
|
||||||
},
|
|
||||||
"url": "https://meshtastic.org/",
|
|
||||||
"vendor": "Nordic Semi"
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s140_v6.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52840_PPR -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [["0x239A", "0x4403"]],
|
|
||||||
"usb_product": "PPR",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "ppr",
|
|
||||||
"variants_dir": "variants",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "6.1.1",
|
|
||||||
"sd_fwid": "0x00B6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"onboard_tools": ["jlink"],
|
|
||||||
"svd_path": "nrf52840.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "Meshtastic PPR (Adafruit BSP)",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "jlink",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "stlink"]
|
|
||||||
},
|
|
||||||
"url": "https://meshtastic.org/",
|
|
||||||
"vendor": "Othernet"
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52833_s113_v7.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52833_PPR -DNRF52833_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [["0x239A", "0x4406"]],
|
|
||||||
"usb_product": "PPR",
|
|
||||||
"mcu": "nrf52833",
|
|
||||||
"variant": "ppr",
|
|
||||||
"variants_dir": "variants",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS113",
|
|
||||||
"sd_name": "s113",
|
|
||||||
"sd_version": "7.2.0",
|
|
||||||
"sd_fwid": "0x00b6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52833_xxAA",
|
|
||||||
"onboard_tools": ["jlink"],
|
|
||||||
"svd_path": "nrf52833.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "Meshtastic PPR1 (Adafruit BSP)",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "jlink",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "stlink"]
|
|
||||||
},
|
|
||||||
"url": "https://meshtastic.org/",
|
|
||||||
"vendor": "Othernet"
|
|
||||||
}
|
|
||||||
@@ -15,10 +15,12 @@
|
|||||||
],
|
],
|
||||||
"f_cpu": "240000000L",
|
"f_cpu": "240000000L",
|
||||||
"f_flash": "80000000L",
|
"f_flash": "80000000L",
|
||||||
|
"f_boot": "120000000L",
|
||||||
|
"boot": "qio",
|
||||||
"flash_mode": "qio",
|
"flash_mode": "qio",
|
||||||
"hwids": [["0x1A86", "0x7523"]],
|
"hwids": [["0x1A86", "0x7523"]],
|
||||||
"mcu": "esp32s3",
|
"mcu": "esp32s3",
|
||||||
"variant": "esp32s3r8"
|
"variant": "esp32s3"
|
||||||
},
|
},
|
||||||
"connectivity": ["wifi", "bluetooth", "lora"],
|
"connectivity": ["wifi", "bluetooth", "lora"],
|
||||||
"debug": {
|
"debug": {
|
||||||
@@ -32,9 +34,9 @@
|
|||||||
"flash_size": "8MB",
|
"flash_size": "8MB",
|
||||||
"maximum_ram_size": 327680,
|
"maximum_ram_size": 327680,
|
||||||
"maximum_size": 8388608,
|
"maximum_size": 8388608,
|
||||||
"require_upload_port": true,
|
"require_upload_port": false,
|
||||||
"use_1200bps_touch": true,
|
"use_1200bps_touch": true,
|
||||||
"wait_for_upload_port": true,
|
"wait_for_upload_port": false,
|
||||||
"speed": 921600
|
"speed": 921600
|
||||||
},
|
},
|
||||||
"url": "https://www.seeedstudio.com/Indicator-for-Meshtastic.html",
|
"url": "https://www.seeedstudio.com/Indicator-for-Meshtastic.html",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
"-DARDUINO_USB_MODE=0",
|
"-DARDUINO_USB_MODE=0",
|
||||||
"-DARDUINO_RUNNING_CORE=1",
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
"-DARDUINO_EVENT_RUNNING_CORE=0"
|
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||||
],
|
],
|
||||||
"f_cpu": "240000000L",
|
"f_cpu": "240000000L",
|
||||||
"f_flash": "80000000L",
|
"f_flash": "80000000L",
|
||||||
|
|||||||
@@ -48,6 +48,6 @@
|
|||||||
"require_upload_port": true,
|
"require_upload_port": true,
|
||||||
"wait_for_upload_port": true
|
"wait_for_upload_port": true
|
||||||
},
|
},
|
||||||
"url": "FIXME",
|
"url": "https://lilygo.cc/products/t-echo-lilygo",
|
||||||
"vendor": "TTGO"
|
"vendor": "LILYGO"
|
||||||
}
|
}
|
||||||
|
|||||||
46
boards/unphone.json
Normal file
46
boards/unphone.json
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"ldscript": "esp32s3_out.ld",
|
||||||
|
"memory_type": "qio_opi",
|
||||||
|
"partitions": "default_8MB.csv"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": [
|
||||||
|
"-DBOARD_HAS_PSRAM",
|
||||||
|
"-DUNPHONE_SPIN=9",
|
||||||
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
|
"-DARDUINO_USB_MODE=0",
|
||||||
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||||
|
],
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "qio",
|
||||||
|
"hwids": [
|
||||||
|
["0x16D0", "0x1178"],
|
||||||
|
["0x303a", "0x1001"]
|
||||||
|
],
|
||||||
|
"mcu": "esp32s3",
|
||||||
|
"variant": "unphone"
|
||||||
|
},
|
||||||
|
"connectivity": ["wifi", "bluetooth", "lora"],
|
||||||
|
"debug": {
|
||||||
|
"default_tool": "esp-builtin",
|
||||||
|
"onboard_tools": ["esp-builtin"],
|
||||||
|
"openocd_target": "esp32s3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino", "espidf"],
|
||||||
|
"name": "unPhone",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "8MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 8323072,
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"wait_for_upload_port": true,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 921600
|
||||||
|
},
|
||||||
|
"url": "https://unphone.net/",
|
||||||
|
"vendor": "University of Sheffield"
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user