Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MakerBoard: MT7688 Emulator

6,221 views

Published on

Explain how to make own container to run program on MTK LinkIt Smart 7688 and other hardware architectures

Published in: Technology
  • Hello there! Get Your Professional Job-Winning Resume Here! http://bit.ly/topresum
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

MakerBoard: MT7688 Emulator

  1. 1. MT7688 Emulator MakerBoard
  2. 2. 錢逢祥 Fred Chien
  3. 3. Open Source Developer 開放原始碼自幹者
  4. 4. 黑客松台灣 共同創辦人 Hackathon Taiwan Co-founder
  5. 5. 多年前 years ago
  6. 6. 在那又大又土又慢又貴的年代
  7. 7. 雖然我 慣 C C Language Enthusiast
  8. 8. 但我也受不了 每天和這些硬體一起醉
  9. 9. 在這追求應用的時代 需要快速打造
  10. 10. 我夢想能有個易開發的方法 在嵌入式系統上
  11. 11. 自從 JavaScript 抬頭 聽說一個語言 20 年會進入成熟期
  12. 12. 希望能用 JavaScript 進行各種物聯網或嵌入式應用開發
  13. 13. 很多的人當我瘋子 在當時
  14. 14. 有一天成真了,有大廠親自跳下來
  15. 15. 我發現我真是瘋子 現在
  16. 16. Play in Pain
  17. 17. Less Memory 記憶體好少
  18. 18. Less Storage 儲存空間好少
  19. 19. Keep Connection Alive 必須連著線開發
  20. 20. SAVE ME ! Please!
  21. 21. Linux Kernel Userspace Node.js (JavaScript Engine) Applications Libraries
  22. 22. Linux Kernel Userspace Node.js (JavaScript Engine) Applications Libraries footprint Memory Usage
  23. 23. 這不是 PC 啊! 也不是 Server!
  24. 24. 等等!?
  25. 25. 我可以在 PC 上模擬嗎?
  26. 26. MakerBoard
  27. 27. Git Repository http://github.com/cfsghost/makerboard
  28. 28. Run an Emulation on your computer
  29. 29. QEMU Virtual Machine
  30. 30. Container technology
  31. 31. 其實你也可以自幹 You can make it
  32. 32. 什麼是 Container ? What's that? LXC? Docker ?
  33. 33. Chroot System Call Unix
  34. 34. 觀察 Linux 開機流程 了解 chroot 機制
  35. 35. Bootloader Linux Kernel Initrd/ramdisk image bin lib usrsbin tmp etc Root Filesystem
  36. 36. Bootloader Linux Kernel Initrd/ramdisk image Root Filesystem on Disk bin lib usrsbin tmp etc Root Filesystem var
  37. 37. Bootloader Linux Kernel Initrd/ramdisk image Root Filesystem on Disk bin lib usrsbin tmp etc Root Filesystem var Detecting Disk & Selecting run level
  38. 38. Bootloader Linux Kernel Initrd/ramdisk image Root Filesystem on Disk bin lib usrsbin tmp etc Root Filesystem var chroot system call (note: privot_root)
  39. 39. Root Filesystem Chroot Linux Kernel bin lib usr ... Chroot ... Chroot ... Chroot ... * Run different systems on the same kernel
  40. 40. 這一切只是個開始 It's jsut the beginning
  41. 41. cgroup
  42. 42. 我能自幹 Container 了 然後呢?
  43. 43. Userspace Chroot Linux Kernel bin lib usr ... x86 Execute ELF files
  44. 44. Userspace Chroot Linux Kernel bin lib usr ... x86 Execute non-x86 ELF files
  45. 45. non-x86 ELF 怎麼跑?
  46. 46. Binary Format Support apt-get install binfmt-support
  47. 47. qemu-user-static apt-get install qemu-user-static
  48. 48. Register ELF on kernel /proc/sys/binfmt_misc
  49. 49. Userspace Chroot Linux Kernel bin lib usr ... QEMU Recognize ELF for ARM, MIPS and other architectures x86 binfmt support
  50. 50. MT7688 MIPS & Little-endian
  51. 51. qemu-mipsel-static <rootfs>/usr/bin/qemu-mipsel-static
  52. 52. Userspace Chroot Linux Kernel bin lib usr ... x86 Hardware Execute Your MIPS Application
  53. 53. All Memory and Storage on computer you can use With Emulation
  54. 54. Sweet! Thank God!
  55. 55. Userspace Chroot Linux Kernel bin lib usr ... x86 Hardware Execute Your MIPS Application
  56. 56. Userspace Chroot Linux Kernel x86 Hardware Userspace Linux Kernel MT7688 Hardware Copying your application to MT7688
  57. 57. Installation How to install MakerBoard?
  58. 58. Install Dependencis sudo apt-get install qemu-user-static squashfs-tools
  59. 59. Install MakerBoard npm install makerboard -g
  60. 60. Usage How to use MakerBoard?
  61. 61. Create an Emulation makerboard create my7688
  62. 62. Run Emulation makerboard run my7688
  63. 63. Live Demo :-)

×