Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
zephyrにパッチ送ったら半年店晒しされた話
Search
soburi
November 13, 2021
Technology
0
100
zephyrにパッチ送ったら半年店晒しされた話
soburi
November 13, 2021
Tweet
Share
More Decks by soburi
See All by soburi
Zephyr RTOS Tutorial & MeetUp @ OSC2025Tokyo/Spring 駒澤大学種月館
tokitahiroshi
1
810
ZephyrRTOSざっくり入門
tokitahiroshi
2
450
ZephyrRTOSざっくり入門#2
tokitahiroshi
2
130
The_Features_of_ZephyrRTOS_and_the_project_operations.pdf
tokitahiroshi
1
38
KiCad 8.0 出ました。
tokitahiroshi
0
380
小江戸らぐ2024/2
tokitahiroshi
0
150
ZephyrRTOSで遊ぼう!
tokitahiroshi
0
600
AliEx系ラベルプリンター Phomemo P12を叩いてみる
tokitahiroshi
0
240
KiCadのGitLabを見たりWeblateで翻訳してみたりしてみる
tokitahiroshi
0
480
Other Decks in Technology
See All in Technology
第64回コンピュータビジョン勉強会「The PanAf-FGBG Dataset: Understanding the Impact of Backgrounds in Wildlife Behaviour Recognition」
x_ttyszk
0
250
AI エージェントと考え直すデータ基盤
na0
21
8.1k
エンジニアリングマネージャー“お悩み相談”パネルセッション
ar_tama
1
100
Frontier Airlines Customer®️ USA Contact Numbers: Complete 2025 Support Guide
frontierairlineswithflyagent
0
100
60以上のプロダクトを持つ組織における開発者体験向上への取り組み - チームAPIとBackstageで構築する組織の可視化基盤 - / sre next 2025 Efforts to Improve Developer Experience in an Organization with Over 60 Products
vtryo
3
2k
クラウド開発の舞台裏とSRE文化の醸成 / SRE NEXT 2025 Lunch Session
kazeburo
1
620
セキュアなAI活用のためのLiteLLMの可能性
tk3fftk
1
370
Microsoft Defender XDRで疲弊しないためのインシデント対応
sophiakunii
2
330
低レイヤソフトウェア技術者が YouTuberとして食っていこうとした話
sat
PRO
5
4.7k
振り返りTransit Gateway ~VPCをいい感じでつなげるために~
masakiokuda
4
210
SREのためのeBPF活用ステップアップガイド
egmc
2
1.3k
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.7k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
72
4.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
990
Building Applications with DynamoDB
mza
95
6.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Raft: Consensus for Rubyists
vanstee
140
7k
Writing Fast Ruby
sferik
628
62k
Practical Orchestrator
shlominoach
189
11k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Thoughts on Productivity
jonyablonski
69
4.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Fireside Chat
paigeccino
37
3.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Transcript
Zephyrにパッチ出したら 半年店晒しにされた話 TOKITA Hiroshi
ZephyrRTOS https://zephyrproject.org/ Linux Foundationが推してるRTOS マイコン向けコンパクトなLinuxと いう雰囲気。
KconfigもDeviceTreeもあるよ! TCPもPOSIX互換もあるよ! そこらに転がってるマイコンも結 構対応している。 ucLinuxとか知ってる人には 「あんな感じ」
パッチ出してきた https://github.com/zephyrpr oject-rtos/zephyr/pull/34970 少し前に一部界隈で流行った Longan Nano を動かすパッチ。
内容としてはRISC-Vの新 CPU(GigaDevice GD32V対応) Bootの初期化コードとか 割り込みの初期化とか。 サンプル実装から適当にパ クッてOSのスタック初期化や 割り込みハンドラと辻褄合わ せるだけの簡単なお仕事?!
GigaDevice GD32V GigaDeviceはGD32というARMのCPUを販売してる。 GD32はS•M32の丸パクリのプロセッサ。 世界で一番売れてるSTM32F103の代替にできる。 当然ピンコンパチ
レジスタも互換なのでST•32のコードがほぼそのまま動く。 ただしデッドコピーではない。自前の互換実装。 GD32VはARMをRISCVに差し替えただけ。 ライセンス費を払わないので、さらにお安く! こんなんだから誰も怖くてパッチを出さない??????
経緯 昨年4月の技術書典に出したネタをGitHubに置いておく。 https://soburi.github.io/zephyr_porting_gd32v/ 内容は途中で途切れていて完結していないw 実質怪文書。 今年5月、何故かフランス語に翻訳される。 記事に書いた内容のパッチを出してないのも勿体ないので、
PR提出。 それから半年、すったもんだしながら停滞中…
パッチを出すと何故かみんな 似たようなパッチを出し始める。 同じメーカーの別のCPUに対応するパッチが続々と出てく る。 https://github.com/zephyrproject-rtos/zephyr/pull/39909 https://github.com/zephyrproject-rtos/zephyr/pull/40283
https://github.com/zephyrproject-rtos/zephyr/pull/36833 https://github.com/zephyrproject-rtos/zephyr/pull/38661 当然微妙に内容が被る→大乱闘
校舎裏^H^H^H Discordに呼び出される ちまちまPRの更新してたのだけど、埒が明かないので、 チャットで決着つけようぜ、となる。 ここに至るまで半年店晒し。 またパッチ書き直してるので、 もうしばらくでAcceptされるはず…
最新のIRC代替はDiscord。 GitterもSlackももう古い?
One More thing. https://www.switch-science.com/catalog/5703/ 似たようなCPUだったので、ついでに対応した。 VerilogがOSSになってる中国製RISCV実装の HummingBirdコアが乗っている。
https://github.com/Lichee-Pi/Tang_E203_Mini このLichee Tang ボードには 出荷時にHummingBirdコアのbitstreamが 書いてあるので、RISCV実装の教材みたいな感じ。 これも対応中。一緒にmainstreamに入れる予定。
まとめ マイコンいじるならZephyr良いよ! まだパッチも出しやすい状況だから みんなドライバ書こう! (ArduinoのI2C使えればPR出せる!)