{
 "Root Filesystem 的組成與型態#3": {
  "type": "table",
  "head": [
   "目錄",
   "用途"
  ],
  "rows": [
   [
    "bin sbin usr/bin usr/sbin",
    "可執行檔,BusyBox 放 bin"
   ],
   [
    "lib",
    "共享函式庫與動態連結器"
   ],
   [
    "etc",
    "inittab fstab passwd hostname"
   ]
  ],
  "widths": [
   2,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ]
 },
 "Root Filesystem 的組成與型態#4": {
  "type": "table",
  "head": [
   "目錄",
   "用途"
  ],
  "rows": [
   [
    "dev",
    "裝置節點,可由 devtmpfs 提供"
   ],
   [
    "proc sys",
    "虛擬檔案系統掛載點"
   ],
   [
    "tmp var run root mnt",
    "暫存、狀態與家目錄"
   ],
   [
    "init 或 sbin/init",
    "第一個行程"
   ]
  ],
  "widths": [
   2,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "Root Filesystem 的組成與型態#5": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "ext4",
    "points": [
     "最通用、可讀寫",
     "SD 卡或 eMMC 分區"
    ]
   },
   {
    "title": "SquashFS",
    "points": [
     "壓縮的唯讀",
     "搭配 overlayfs 或 tmpfs"
    ]
   },
   {
    "title": "UBIFS JFFS2",
    "points": [
     "建在原始 NAND NOR",
     "自帶磨損均衡"
    ]
   },
   {
    "title": "initramfs",
    "points": [
     "CPIO 壓縮檔載入 RAM",
     "重開機就還原"
    ]
   }
  ]
 },
 "Root Filesystem 的組成與型態#6": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   3,
   3
  ],
  "nodes": [
   {
    "label": "開發 PC",
    "sub": "放 rootfs",
    "color": 0
   },
   {
    "label": "網路",
    "sub": "NFS",
    "color": 2
   },
   {
    "label": "板子",
    "sub": "NFS root 掛載",
    "color": 1
   }
  ]
 },
 "Root Filesystem 的組成與型態#7": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   5,
   5,
   5
  ],
  "nodes": [
   {
    "label": "init= 參數",
    "sub": "命令列指定",
    "color": 0
   },
   {
    "label": "sbin/init",
    "color": 1
   },
   {
    "label": "etc/init",
    "color": 2
   },
   {
    "label": "bin/init",
    "color": 3
   },
   {
    "label": "bin/sh",
    "sub": "最後嘗試",
    "color": 4
   }
  ]
 },
 "BusyBox:用一個執行檔組成最小系統#2": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   5
  ],
  "nodes": [
   {
    "label": "git clone",
    "sub": "抓 BusyBox",
    "color": 0
   },
   {
    "label": "cd busybox",
    "color": 1
   },
   {
    "label": "make defconfig",
    "sub": "預設設定",
    "color": 2
   },
   {
    "label": "make menuconfig",
    "sub": "進去調整",
    "color": 3
   },
   {
    "label": "靜態連結",
    "sub": "Build static binary",
    "color": 4
   }
  ]
 },
 "BusyBox:用一個執行檔組成最小系統#4": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   3,
   3,
   4,
   4
  ],
  "nodes": [
   {
    "label": "補目錄",
    "color": 0
   },
   {
    "label": "檢查 BusyBox",
    "color": 1
   },
   {
    "label": "寫 init 腳本",
    "color": 2
   },
   {
    "label": "chmod",
    "sub": "加執行權限",
    "color": 3
   }
  ]
 },
 "BusyBox:用一個執行檔組成最小系統#5": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "cd",
    "sub": "root fs 目錄",
    "color": 0
   },
   {
    "label": "mkdir -p",
    "sub": "proc sys dev…",
    "color": 1
   },
   {
    "label": "file",
    "sub": "確認 ARM64",
    "color": 2
   },
   {
    "label": "readelf",
    "sub": "grep NEEDED",
    "color": 3
   }
  ]
 },
 "BusyBox:用一個執行檔組成最小系統#6": {
  "type": "table",
  "head": [
   "行",
   "內容"
  ],
  "rows": [
   [
    "#!/bin/sh",
    "指定用 bin/sh 執行"
   ],
   [
    "mount -t proc",
    "掛載到 /proc"
   ],
   [
    "mount -t sysfs",
    "掛載到 /sys"
   ],
   [
    "mount -t devtmpfs",
    "掛載到 /dev"
   ],
   [
    "echo",
    "印出歡迎訊息"
   ]
  ],
  "widths": [
   3,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ]
 },
 "Buildroot:一鍵建置完整系統#1": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "手工做 rootfs",
    "points": [
     "下載",
     "設定",
     "交叉編譯",
     "解決相依",
     "安裝"
    ]
   },
   {
    "title": "Buildroot",
    "points": [
     "以上全部自動化",
     "Makefile 加 Kconfig",
     "menuconfig 選好再 make"
    ]
   }
  ]
 },
 "Buildroot:一鍵建置完整系統#3": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   5,
   6
  ],
  "nodes": [
   {
    "label": "下載原始碼",
    "color": 0
   },
   {
    "label": "建置工具鏈",
    "color": 1
   },
   {
    "label": "建置 kernel",
    "color": 2
   },
   {
    "label": "建置 rootfs",
    "color": 3
   },
   {
    "label": "output/images",
    "sub": "成品",
    "color": 4
   },
   {
    "label": "root 登入",
    "sub": "QEMU",
    "color": 5
   }
  ]
 },
 "Buildroot:一鍵建置完整系統#4": {
  "type": "table",
  "head": [
   "指令",
   "作用"
  ],
  "rows": [
   [
    "make qemu_aarch64_virt_defconfig",
    "載入預設設定"
   ],
   [
    "make",
    "建置"
   ],
   [
    "ls output/images",
    "看成品"
   ],
   [
    "./output/images/start-qemu.sh",
    "啟動 QEMU"
   ]
  ],
  "widths": [
   3,
   2
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "Buildroot:一鍵建置完整系統#5": {
  "type": "table",
  "head": [
   "output 子目錄",
   "內容"
  ],
  "rows": [
   [
    "build",
    "各套件解壓縮與編譯"
   ],
   [
    "host",
    "開發機工具,含交叉編譯器"
   ],
   [
    "staging",
    "目標標頭檔與函式庫"
   ],
   [
    "target",
    "目標 rootfs 內容,非最終映像"
   ],
   [
    "images",
    "最終成品"
   ]
  ],
  "widths": [
   2,
   3
  ],
  "reveal": [
   0,
   3,
   5
  ]
 },
 "客製化 rootfs:overlay、自訂套件與燒錄 SD 卡#1": {
  "type": "table",
  "head": [
   "overlay 目錄內",
   "目標上"
  ],
  "rows": [
   [
    "etc/hostname",
    "/etc/hostname"
   ],
   [
    "etc/init.d/S99myapp",
    "開機自動啟動的腳本"
   ]
  ],
  "widths": [
   3,
   3
  ],
  "reveal": [
   0,
   0,
   2,
   2
  ]
 },
 "客製化 rootfs:overlay、自訂套件與燒錄 SD 卡#2": {
  "type": "table",
  "head": [
   "參數",
   "動作"
  ],
  "rows": [
   [
    "start",
    "印出訊息,背景啟動程式"
   ],
   [
    "stop",
    "結束程式"
   ],
   [
    "其他",
    "印出用法,錯誤碼離開"
   ]
  ],
  "widths": [
   1,
   3
  ],
  "reveal": [
   0,
   3,
   3,
   3,
   3
  ]
 },
 "客製化 rootfs:overlay、自訂套件與燒錄 SD 卡#3": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2
  ],
  "cards": [
   {
    "title": "post-build 腳本",
    "points": [
     "rootfs 組好後",
     "打包成映像前",
     "第一個參數是 target 目錄",
     "修改 fstab、刪不要的檔"
    ]
   },
   {
    "title": "post-image 腳本",
    "points": [
     "映像產生之後",
     "組合最終 SD 卡映像",
     "搭配 genimage"
    ]
   }
  ]
 },
 "客製化 rootfs:overlay、自訂套件與燒錄 SD 卡#4": {
  "type": "table",
  "head": [
   "檔案",
   "作用"
  ],
  "rows": [
   [
    "external.desc",
    "幫外掛樹取名 MYBOARD"
   ],
   [
    "external.mk、Config.in",
    "把套件引入進來"
   ],
   [
    "package/hello/Config.in",
    "宣告布林選項 hello"
   ],
   [
    "hello.mk 建置命令",
    "用交叉編譯器執行 make"
   ],
   [
    "hello.mk 安裝命令",
    "裝 hello 到 usr/bin"
   ]
  ],
  "widths": [
   2,
   3
  ],
  "reveal": [
   0,
   0,
   2,
   3,
   4,
   5
  ]
 }
}