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
あのころの iPod を どうにか再生させたい
Search
orumin
August 09, 2025
Programming
2.9k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
あのころの iPod を どうにか再生させたい
Kernel/VM勉強会@東京 #18
orumin
August 09, 2025
More Decks by orumin
See All by orumin
ヴィンテージマシンと付き合う - kernel/vm online 5
orumin
0
1.2k
むかしの RISC、むかしの Unix
orumin
7
3.8k
Fundamental of architecture to implementing OS on AArch64
orumin
3
5.4k
Kernel/VM Kansai #9
orumin
0
1k
Kernel/VM #14 発表資料
orumin
1
640
Unikernels report
orumin
2
530
第13回Kernel/VM勉強会発表資料
orumin
1
1.7k
第12回カーネル/VM探検隊
orumin
0
400
第11回 Kernel/VM探検隊 発表資料
orumin
1
610
Other Decks in Programming
See All in Programming
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
7
4.1k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
130
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.4k
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
190
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
120
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
540
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
350
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Un-Boring Meetings
codingconduct
0
310
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Deep Space Network (abreviated)
tonyrice
0
170
Tell your own story through comics
letsgokoyo
1
950
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
580
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
190
Transcript
あのころの iPod を どうにか再生させたい kernel/vm 勉強会@東京 #18 @orumin 2025-08-09
Self-introduce • orumin です • 組み込みっぽい領域の R&D とか開発とか ‣ 浅瀬ぱちゃぱちゃしてます
@orumin あのころの iPod を 2025-08-09 1 / 32
Previous story @orumin あのころの iPod を 2025-08-09 2 / 32
Previous story @orumin あのころの iPod を 2025-08-09 3 / 32
Previous story • 前回 ‣ 古い iPod の SSD/SD 化のご紹介
‣ Rockbox のご紹介 ‣ memmap、パーティション構成 @orumin あのころの iPod を 2025-08-09 4 / 32
Goal • OSOS パーティションに適当なコードを置いて自作 OS @orumin あのころの iPod を 2025-08-09
5 / 32
Goal • OSOS パーティションに適当なコードを置いて自作 OS @orumin あのころの iPod を 2025-08-09
6 / 32
Brand new exploit(s) • WInd3x, the iPod Bootrom exploit 10
years too late ‣ 2023 年 10 月 • S5Late ‣ 2024 年 12 月 → (Goal)これを糸口に簡単 iPod プログラミング環境を構築・提供 したい @orumin あのころの iPod を 2025-08-09 7 / 32
wInd3x • q3k 氏の発見した exploit • iPod nano4G 以降で利用できる ‣
iPod nano3G 以前は Pwnage 2.0 が使える @orumin あのころの iPod を 2025-08-09 8 / 32
wInd3x - iPod boot (usual) BootROM 2nd stg loader(NAND/NOR) OS(NAND)
disk mode(NAND) Diag(NAND) @orumin あのころの iPod を 2025-08-09 9 / 32
wInd3x - iPod boot (usual) • IMG1 と呼ばれるフォーマットのイメージが使われ、DER エン コードの
ASN.1/X.509 署名がされている ‣ DER パーサーがバグっている (Pwnage 2.0) @orumin あのころの iPod を 2025-08-09 10 / 32
wInd3x - iPod boot (WTF/DFU) BootROM WTF/DFU recovery disk mode
@orumin あのころの iPod を 2025-08-09 11 / 32
wInd3x - iPod boot (WTF/DFU) • USB stack(BootROM) <-packet-> DFU
mode ‣ iPod は OTG も対応 • USB device reqbmRequestType & 0x60 == 0x20 or 0x40 ‣ class or vendor のハンドル ‣ ハンドリング中、bmRequestType & 0x3 == 0 で wIndex の境界チェック が抜けている • bmRequest==0x20 && wIndex=3 で BootROM の 0x000~0x600 を任意に実行 ‣ 0x3b0 にちょうど便利な blx r0 が居る ‣ SETUP パケットをそのままバイナリコードとして実行させられる @orumin あのころの iPod を 2025-08-09 12 / 32
wInd3x git clone https://github.com/freemyipod/wInd3x cd wInd3x go build ./cmd/wInd3x ./wInd3x
@orumin あのころの iPod を 2025-08-09 13 / 32
wInd3x • ROM flash せずとも gadget 送ったり ROM を decrypt
したりでき る、べんり! • Hello, world 的なものを簡単に準備できる SDK っぽいものを準備 すればイケる! • 勝った! @orumin あのころの iPod を 2025-08-09 14 / 32
Trouble 1 @orumin あのころの iPod を 2025-08-09 15 / 32
Trouble 1 • Gentoo Linux の kernel config 足りてなかった @orumin
あのころの iPod を 2025-08-09 15 / 32
Trouble 2 • iPod のバッテリー死にかけ 💀 @orumin あのころの iPod を
2025-08-09 16 / 32
Trouble 2 • iPod のバッテリー死にかけ 💀 • とりあえず 30pin ケーブルつないでる間だけは
boot する @orumin あのころの iPod を 2025-08-09 16 / 32
Trouble 3 謎の libusb1.0 エラー! • wInd3x で DFU exploit
まで成功する • バイナリ投げて実行させたた途端、一生 I/O エラーが出る ‣ もはや自宅のマシンの H/W の問題な気がする 雑な見積りで直前にやるのをやめよう @orumin あのころの iPod を 2025-08-09 17 / 32
Appendix • iPod と UEFI の関係 ‣ 2nd stage loader
はなぜか EFI の ESP と driver らしきものが流用 されているらしい ‣ 案外モダン ‣ たしかに iPod nano 4G は 2008 とかなので EFI 1.x 採用の Intel Mac と時期が前後する • RTXC ‣ 元 Apple の Paul Mercer 氏が建てた Pixo の Pixo OS が retail OS らしい ‣ コアに Quadros の RTOS、RTXC が使われているのだとか @orumin あのころの iPod を 2025-08-09 18 / 32
Future work • 次回の関西か東京ではまともな Linux マシン用意して iPod 実機 デモをお見せできるよう頑張ります ‣
一応バイナリはできた(動作未確認) ‣ USB コントローラが壊れてないまともマシンなら問題ないと 信じています @orumin あのころの iPod を 2025-08-09 19 / 32
惨状 @orumin あのころの iPod を 2025-08-09 20 / 32
惨状 • 前回からいろいろ iPod 増やしました • PortalPlayer PP5021C・Samsung S5L8702 (Armv4T)、S5L8720、
S5L830 (Armv6) @orumin あのころの iPod を 2025-08-09 21 / 32
こぼれ話 • 30p ケーブルいつのまにか紛失してたんですが、ヨドバシにまだ 在庫売ってた @orumin あのころの iPod を 2025-08-09
22 / 32
こぼれ話 • 一部液晶が破損・表示欠損していたはずの iPod Classic が久々に 起動したら特に欠けなく表示されていた @orumin あのころの iPod
を 2025-08-09 23 / 32
こぼれ話 • 朝なんとかエラー解決できないかと考えながら家をうろうろし てたら、いつ買ったか覚えのない iPod nano 4G/5G が本棚から出 てきた @orumin
あのころの iPod を 2025-08-09 24 / 32
Info CP15 ---- ID code: 0x410fb764 Implementer: ARM Variant: 0x0
Architecture: See CPUID Part number: b76, Revision: 4 Extra Junk: CP15 c0,c0,0 (Main ID): 410fb764 CP15 c0,c0,1 (Cache Type): 1d152152 CP15 c0,c0,2 (TCM Status): 00000000 CP15 c0,c0,3 (TLB Type): 00000800 CP15 c0,c1,0 (Processor Feature 0): 00000111 CP15 c0,c1,1 (Processor Feature 1): 00000011 @orumin あのころの iPod を 2025-08-09 25 / 32
Info CP15 c0,c1,2 (Debug Feature 0): 00000033 CP15 c0,c1,3 (Auxiliary
Feature 0): 00000000 CP15 c0,c1,4 (Memory Model Feature 0): 01130003 CP15 c0,c1,5 (Memory Model Feature 1): 10030302 CP15 c0,c1,6 (Memory Model Feature 2): 01222100 CP15 c0,c1,7 (Memory Model Feature 3): 00000000 CP15 c0,c2,0 (Instruction Set Feature Attribute 0): 00140011 CP15 c0,c2,1 (Instruction Set Feature Attribute 1): 12002111 CP15 c0,c2,2 (Instruction Set Feature Attribute 2): 11231121 CP15 c0,c2,3 (Instruction Set Feature Attribute 3): 01102131 @orumin あのころの iPod を 2025-08-09 26 / 32
Info CP15 c0,c2,4 (Instruction Set Feature Attribute 4): 00001141 CP15
c0,c2,5 (Instruction Set Feature Attribute 5): 00000000 CP15 c1,c0,0 (Control): 00450078 CP15 c1,c0,1 (Auxiliary Control): 00000007 CP15 c1,c0,2 (Coprocessor Access Control): 00000000 CP15 c1,c1,0 (Secure Configuration): 00000000 CP15 c1,c1,1 (Secure Debug Enable): 00000000 CP15 c1,c1,2 (Non-Secure Access Control): 00000000 CP15 c2,c0,0 (Translation Table Base 0): 00000000 CP15 c2,c0,1 (Translation Table Base 1): 00000000 CP15 c2,c0,2 (Translation Table Base Control): 00000000 CP15 c3,c0,0 (Domain Access Control): 00000000 @orumin あのころの iPod を 2025-08-09 27 / 32
Info CP15 c7,c4,0 (PCA): 00000000 CP15 c7,c10,6 (Cache Dirty Status):
00000000 CP15 c9,c0,0 (Data Cache Lockdown): fffffff0 CP15 c9,c0,1 (Instruction Cache Lockdown): fffffff0 CP15 c9,c1,0 (Data TCM Region): 00000000 CP15 c9,c1,1 (Instruction TCM Region): 00000000 CP15 c9,c1,2 (Data TCM Non-secure Control Access): 00000000 CP15 c9,c1,3 (Instruction TCM Non-secure Control Access): 00000000 CP15 c9,c2,0 (TCM Selection): 00000000 CP15 c9,c8,0 (Cache Behavior Override): 00000000 CP14 (debug) ---- @orumin あのころの iPod を 2025-08-09 28 / 32
Info DIDR: 0x15121004 DSCR: 0x00000002 SysCfg ------ Failed to read
syscfg: unimplemented CHIPID ------ CID_VALID: 00000001 CHIPIDL: 19000011 CHIPIDH: 8730000b DIEIDL: 8eb9f8d0 DIEIDH: 00000175 @orumin あのころの iPod を 2025-08-09 29 / 32
Info ECID_VERSION: 00000004 GPIO ---- 01234567 GPIO 000-007: state: HHHHH_HH
dir: iiiiiiii GPIO 008-015: state: HHHHHH_H dir: iiiiiiii GPIO 016-023: state: HHHHHHHH dir: iiiiiiii GPIO 024-031: state: HHHHHHHH dir: iiiiiiii GPIO 032-039: state: HHHHHHHH @orumin あのころの iPod を 2025-08-09 30 / 32
Info dir: iiiiiiii GPIO 040-047: state: HHHHHHH_ dir: iiiiiiii GPIO
048-055: state: _____HHH dir: iiiiiiii GPIO 056-063: state: H_______ dir: iiiiiiii GPIO 064-071: state: _HHHHHH_ dir: iiiiiiii GPIO 072-079: state: _H___HH_ dir: iiiiiiii GPIO 080-087: state: HH_H_HH_ dir: iiiiiiii GPIO 088-095: state: ____H_HH @orumin あのころの iPod を 2025-08-09 31 / 32
Info dir: iiiiiiii GPIO 096-103: state: HHHHHHHH dir: iiiOiiii GPIO
104-111: state: HHHHHHHH dir: iiiiiiii GPIO 112-119: state: HHHH__HH dir: iiiiiiii GPIO 120-127: state: HHHHHHHH dir: iiiiiiii @orumin あのころの iPod を 2025-08-09 32 / 32