Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
初代プレステでuCLinuxその1 Linuxのinitで「Hello World」
Search
kazueda
February 08, 2025
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
初代プレステでuCLinuxその1 Linuxのinitで「Hello World」
kazueda
February 08, 2025
More Decks by kazueda
See All by kazueda
16ビットCPU用FUZIXを実機で動かす「X68000でrootfsマウント編」
kazueda
1
19
16ビットCPU用FUZIXを実機で動かす USBキーボード接続編
kazueda
0
32
16ビットCPU用FUZIXを実機で動かす キー入力編
kazueda
0
36
初代プレステでuCLinuxその2「rootfsが公開されました」
kazueda
0
72
Raspberry pi 400をUSBキーボードとして使う
kazueda
0
500
「東海道らぐ」のブースで「USBガジェット三昧」の展示
kazueda
0
59
Raspberry Pi Pico WでRNDIS-Wifiブリッジ
kazueda
0
140
Raspberry pi pico2の亜種で Risc-V用Linux-nommuを起動する話
kazueda
1
670
PythonのソースファイルをLLMで修正した話
kazueda
0
140
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Transcript
初代プレステでuCLinuxその1 Linuxのinitで「Hello World」 小江戸らぐ10月のオフな集まり(第271回) 2025. 2. 8 1 kazueda か
ず え だ
PlayStation(プレイステーション、略称: PS, PS1) • ソニー・コンピュータエンタテインメント(略: SCE)が 1994年12月3日に発売した家庭用ゲーム機 • CPU:MIPS R3000A
ベース • 32ビット RISCプロセッサ (R3051) • メインメモリ: 2 MB EDO DRAM 2 https://ja.wikipedia.org/wiki/PlayStation_(%E3%82%B2%E3%83%BC%E3%83%A0%E6%A9%9F)
OSC2025大阪の展示 3 • M5Stack用のプログラ ムは、LLMで作成 • 初代プレステ側では unirom8というユー ティリティを起動 •
M5Stackでボタン操作 して、ファイル転送 • Kernelの起動に成功
RUnix on PlayStation 1 • MIPS-NOMMUなので、uClinux 2.4.x kernel • RS232
SIO経由のシリアルコンソール • プレイステーションのGPU経由の仮想コンソール • 保存メディアとしてマルチプルメモリーカード • SL811を使って、USBキーボードやマウスを接続 • 上記の環境が構築されるらしい。。。 4 https://en.wikipedia.org/wiki/PSXLinux
RUnix on PlayStation 1 • MIPS-NOMMUなので、uClinux 2.4.x kernel • RS232
SIO経由のシリアルコンソール • プレイステーションのGPU経由の仮想コンソール • 保存メディアとしてマルチプルメモリーカード • SL811を使って、USBキーボードやマウスを接続 • 上記の環境が構築されるらしい。。。 5 https://en.wikipedia.org/wiki/PSXLinux • 1枚のメモリーカードの容量:112 kB (8 kB x 14) • 複数のカードを切り替えて使用? • カードへの書き込みフォーマットは? <-ブロックデバイスとして利用?
RUnix on PlayStation 1 • MIPS-NOMMUなので、uClinux 2.4.x kernel • RS232
SIO経由のシリアルコンソール • プレイステーションのGPU経由の仮想コンソール • 保存メディアとしてマルチプルメモリーカード • SL811を使って、USBキーボードやマウスを接続 • 上記の環境が構築されるらしい。。。 6 https://en.wikipedia.org/wiki/PSXLinux • 1枚のメモリーカードの容量:112 kB (8 kB x 14) • 複数のカードを切り替えて使用? • カードへの書き込みフォーマットは? <-ブロックデバイスとして利用? • カード上のinitファイルを読み込めるようにする。 <-ファイル名「init」のHello Wolrdを作成し、 「Hello World」表示後にKernel panicを。
進め方 7 1. Qemu-x86_64上で、initの「Hello World」 2. Qemu-system-mipsel上で、initの「Hello World」 3. 初代プレステのエミュレータ上で、
initの「Hello World」 4. 初代プレステ本体上で、 initの「Hello World」 5. Rootfsの作成 6. ログインプロンプトの表示
Qemu-x86_64上で、initの「Hello World」 1. Linuxカーネルのソースからのビルド git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git 2. Busyboxのビルド git://github.com/mirror/busybox.git 3. Linuxの起動確認
4. Linuxのinitファイルの入れ替え 5. 「Hello, Kernel!」表示後のカーネルパニック観察 8 https://medium.com/@chienhaotan/compiling-and-running-a-minimal-kernel-with-busybox-bfc45a991017
「Hello world」の後のKernel panic 9
「Hello world」の後のKernel panic 10
Mipsel用「Hello World」 • MIPS32ビット、リトルエンディアン 1. クロスコンパイラの準備 2. Qemu-mipselでの動作確認 11 https://noobient.com/2020/12/22/mips-cross-compilation-crash-course/#Toolchain
Mipsel用「Hello World」 • MIPS32ビット、リトルエンディアン 1. クロスコンパイラの準備 $ sudo apt -y
install gcc-mipsel-linux-gnu ¥ g++-mipsel-linux-gnu qemu qemu-user 2. Qemu-mipselでの動作確認 $ mipsel-linux-gnu-gcc -static hello.c -o hello $ qemu-mipsel hello 12 https://noobient.com/2020/12/22/mips-cross-compilation-crash-course/#Toolchain
Mipsel用「Hello World」 • MIPS32ビット、リトルエンディアン 1. クロスコンパイラの準備 $ sudo apt -y
install gcc-mipsel-linux-gnu ¥ g++-mipsel-linux-gnu qemu qemu-user 2. Qemu-mipselでの動作確認 $ mipsel-linux-gnu-gcc -static hello.c -o hello $ qemu-mipsel hello 13 https://noobient.com/2020/12/22/mips-cross-compilation-crash-course/#Toolchain
Mipsel用「Hello World」 • MIPS32ビット、リトルエンディアン 1. クロスコンパイラの準備 $ sudo apt -y
install gcc-mipsel-linux-gnu ¥ g++-mipsel-linux-gnu qemu qemu-user 2. Qemu-mipselでの動作確認 $ mipsel-linux-gnu-gcc -static hello.c -o hello $ qemu-mipsel hello 14 https://noobient.com/2020/12/22/mips-cross-compilation-crash-course/#Toolchain
Mipsel用「Hello World」 • MIPS32ビット、リトルエンディアン 1. クロスコンパイラの準備 $ sudo apt -y
install gcc-mipsel-linux-gnu ¥ g++-mipsel-linux-gnu qemu qemu-user 2. Qemu-mipselでの動作確認 $ mipsel-linux-gnu-gcc -static hello.c -o hello $ qemu-mipsel hello 15 https://noobient.com/2020/12/22/mips-cross-compilation-crash-course/#Toolchain
まとめ • Qemu-x86_64上で、initの「Hello World」を表示 • Qemu-system-mipsel上で、initの「Hello World」 • 初代プレステのエミュレータ上で、 initの「Hello
World」 • 初代プレステ本体上で、 initの「Hello World」 16 今後の展開 おわり