MT7688 Emulator
Mak
erB
oard
錢逢祥Fred Chien
Open Source Developer開放原始碼自幹者
黑客松台灣 共同創辦人
Hackathon Taiwan Co-founder
多年前years ago
在那又大又土又慢又貴的年代
雖然我 慣 CC Language Enthusiast
但我也受不了每天和這些硬體一起醉
在這追求應用的時代需要快速打造
我夢想能有個易開發的方法在嵌入式系統上
自從 JavaScript 抬頭聽說一個語言 20 年會進入成熟期
希望能用 JavaScript進行各種物聯網或嵌入式應用開發
很多的人當我瘋子在當時
有一天成真了,有大廠親自跳下來
我發現我真是瘋子現在
Play in Pain
Less Memory記憶體好少
Less Storage儲存空間好少
Keep Connection Alive必須連著線開發
SAVE ME !Please!
Linux Kernel
Userspace
Node.js (JavaScript Engine)
Applications
Libraries
Linux Kernel
Userspace
Node.js (JavaScript Engine)
Applications
Libraries
footprint
Memory Usage
這不是 PC 啊!也不是 Server!
等等!?
我可以在 PC 上模擬嗎?
MakerBoard
Git Repositoryhttp://github.com/cfsghost/makerboard
Run an Emulationon your computer
QEMUVirtual Machine
Containertechnology
其實你也可以自幹You can make it
什麼是 Container ?What's that?
LXC? Docker ?
Chroot System CallUnix
觀察 Linux 開機流程了解 chroot 機制
Bootloader
Linux Kernel
Initrd/ramdisk image
bin lib
usrsbin tmp
etc
Root Filesystem
Bootloader
Linux Kernel
Initrd/ramdisk image
Root Filesystem on Disk
bin lib
usrsbin tmp
etc
Root Filesystem
var
Bootloader
Linux Kernel
Initrd/ramdisk image
Root Filesystem on Disk
bin lib
usrsbin tmp
etc
Root Filesystem
var
Detecting Disk & Selecting run level
Bootloader
Linux Kernel
Initrd/ramdisk image
Root Filesystem on Disk
bin lib
usrsbin tmp
etc
Root Filesystem
var
chroot system call
(note: privot_root)
Root Filesystem
Chroot
Linux Kernel
bin lib usr ...
Chroot
...
Chroot
...
Chroot
...
* Run different systems on the same kernel
這一切只是個開始It's jsut the beginning
cgroup
我能自幹 Container 了然後呢?
Userspace
Chroot
Linux Kernel
bin lib usr ...
x86
Execute ELF files
Userspace
Chroot
Linux Kernel
bin lib usr ...
x86
Execute non-x86 ELF files
non-x86 ELF怎麼跑?
Binary Format Supportapt-get install binfmt-support
qemu-user-staticapt-get install qemu-user-static
Register ELF on kernel/proc/sys/binfmt_misc
Userspace
Chroot
Linux Kernel
bin lib usr ...
QEMU
Recognize ELF for ARM, MIPS and other architectures
x86
binfmt support
MT7688MIPS & Little-endian
qemu-mipsel-static<rootfs>/usr/bin/qemu-mipsel-static
Userspace
Chroot
Linux Kernel
bin lib usr ...
x86 Hardware
Execute Your MIPS Application
All Memory and Storage on computer you can use
With Emulation
Sweet!Thank God!
Userspace
Chroot
Linux Kernel
bin lib usr ...
x86 Hardware
Execute Your MIPS Application
Userspace
Chroot
Linux Kernel
x86 Hardware
Userspace
Linux Kernel
MT7688 Hardware
Copying your application to MT7688
InstallationHow to install MakerBoard?
Install Dependencissudo apt-get install qemu-user-static squashfs-tools
Install MakerBoardnpm install makerboard -g
UsageHow to use MakerBoard?
Create an Emulationmakerboard create my7688
Run Emulationmakerboard run my7688
Live Demo:-)
Top Related