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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
soburi
November 13, 2021
Technology
130
0
Share
zephyrにパッチ送ったら半年店晒しされた話
soburi
November 13, 2021
More Decks by soburi
See All by soburi
Community Activities In Japan
tokitahiroshi
0
87
ZephyrでWASMを動かして起きる色々なこと
tokitahiroshi
0
210
OSSJ CFP提出反省会
tokitahiroshi
0
170
Zephyr RTOS Tutorial & MeetUp @ OSC2025Tokyo/Spring 駒澤大学種月館
tokitahiroshi
1
1.1k
ZephyrRTOSざっくり入門
tokitahiroshi
4
1.2k
ZephyrRTOSざっくり入門#2
tokitahiroshi
3
280
The_Features_of_ZephyrRTOS_and_the_project_operations.pdf
tokitahiroshi
1
120
KiCad 8.0 出ました。
tokitahiroshi
0
450
小江戸らぐ2024/2
tokitahiroshi
0
180
Other Decks in Technology
See All in Technology
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
550
Spring AI × MCP 入門〜AIエージェントへのツール公開、境界設計から始める最小構成 〜
yuyamiyamoto
0
190
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
190
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
110
開発を止めない CI/CD ~CI Visibilityによる継続的最適化~
pensuke628
0
220
Ruby::Boxでできること、Refinementsでできること
joker1007
2
110
美味しいスイスチーズを作ろう🧀🐭
taigamikami
1
190
Amazon Bedrock 経由の Claude Cowork を試してみよう・MCP にも繋いでみよう
sugimomoto
0
290
oracle-to-databricks-migration-with-llm-and-dbt
casek
1
380
海外カンファレンス「JavaOne」参加レポート ユーザー系IT企業における目的・成果/JavaOne Report Purpose and Results in the User IT Company
muit
0
120
GitHub Copilot CLIでWebアクセシビリティを改善した話
tomokusaba
0
140
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
150
Featured
See All Featured
KATA
mclloyd
PRO
35
15k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
Agile that works and the tools we love
rasmusluckow
331
21k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Utilizing Notion as your number one productivity tool
mfonobong
4
310
Fireside Chat
paigeccino
42
3.9k
Designing Experiences People Love
moore
143
24k
The World Runs on Bad Software
bkeepers
PRO
72
12k
So, you think you're a good person
axbom
PRO
2
2k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
950
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出せる!)