{
 "Yocto 與 OpenEmbedded 的架構#1": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "OE-Core",
    "points": [
     "最基礎的 recipe 與 class"
    ]
   },
   {
    "title": "BitBake",
    "points": [
     "建置引擎",
     "解析相依、平行執行任務"
    ]
   },
   {
    "title": "Poky",
    "points": [
     "參考發行版",
     "BitBake、OE-Core 等"
    ]
   },
   {
    "title": "Layer",
    "points": [
     "meta 開頭的目錄",
     "依功能分層"
    ]
   }
  ]
 },
 "Yocto 與 OpenEmbedded 的架構#2": {
  "type": "table",
  "head": [
   "名詞",
   "說明"
  ],
  "rows": [
   [
    "Recipe",
    ".bb 配方:取得、設定、編譯、安裝"
   ],
   [
    "Class",
    ".bbclass 共用邏輯,如 cmake"
   ],
   [
    "Machine",
    "目標硬體,如 qemuarm64"
   ],
   [
    "Distro",
    "發行版政策,預設 poky"
   ],
   [
    "Image",
    "最終映像 recipe,如 core-image-minimal"
   ]
  ],
  "widths": [
   1,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ]
 },
 "Yocto 與 OpenEmbedded 的架構#3": {
  "type": "bar",
  "labels": [
   "硬碟下限",
   "硬碟上限",
   "記憶體下限"
  ],
  "values": [
   50,
   100,
   8
  ],
  "unit": " GB",
  "reveal": [
   0,
   0,
   0,
   0,
   3
  ]
 },
 "Yocto 與 OpenEmbedded 的架構#4": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "git clone",
    "sub": "-b 指定分支",
    "color": 0
   },
   {
    "label": "cd poky",
    "color": 1
   },
   {
    "label": "source",
    "sub": "oe-init-build-env build",
    "color": 2
   },
   {
    "label": "bitbake",
    "sub": "core-image-minimal",
    "color": 3
   }
  ]
 },
 "Yocto 與 OpenEmbedded 的架構#6": {
  "type": "table",
  "head": [
   "變數",
   "值"
  ],
  "rows": [
   [
    "MACHINE",
    "qemuarm64"
   ],
   [
    "DISTRO",
    "poky"
   ],
   [
    "PACKAGE_CLASSES",
    "package_rpm"
   ],
   [
    "EXTRA_IMAGE_FEATURES",
    "debug-tweaks"
   ],
   [
    "BB_NUMBER_THREADS",
    "8"
   ]
  ],
  "widths": [
   3,
   2
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ]
 },
 "Yocto 與 OpenEmbedded 的架構#7": {
  "type": "table",
  "head": [
   "變數",
   "值"
  ],
  "rows": [
   [
    "PARALLEL_MAKE",
    "-j 8"
   ],
   [
    "DL_DIR",
    "${TOPDIR}/downloads"
   ],
   [
    "SSTATE_DIR",
    "${TOPDIR}/sstate-cache"
   ]
  ],
  "widths": [
   2,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ]
 },
 "Layer 與 Recipe:加入自己的應用程式#2": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "cd poky",
    "color": 0
   },
   {
    "label": "source",
    "sub": "oe-init-build-env build",
    "color": 1
   },
   {
    "label": "create-layer",
    "sub": "../meta-my-layer",
    "color": 2
   },
   {
    "label": "add-layer",
    "sub": "加入 bblayers.conf",
    "color": 3
   }
  ]
 },
 "Layer 與 Recipe:加入自己的應用程式#4": {
  "type": "table",
  "head": [
   "重點",
   "變數"
  ],
  "rows": [
   [
    "授權",
    "LICENSE、LIC_FILES_CHKSUM"
   ],
   [
    "原始碼來源",
    "SRC_URI,file:// 取自 files 目錄"
   ],
   [
    "交叉編譯",
    "CC、CFLAGS、LDFLAGS"
   ],
   [
    "安裝",
    "D 加 bindir,即 usr/bin"
   ]
  ],
  "widths": [
   1,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "系統啟動與服務管理:init、BusyBox init 與 systemd#2": {
  "type": "table",
  "head": [
   "init",
   "特色"
  ],
  "rows": [
   [
    "BusyBox init",
    "最小,讀 inittab,服務是 init.d 腳本"
   ],
   [
    "SysV init",
    "傳統做法,runlevel 與 rc 目錄"
   ],
   [
    "systemd",
    "相依管理、平行啟動、自動重啟、日誌、計時器、資源限制"
   ]
  ],
  "widths": [
   1,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ]
 },
 "系統啟動與服務管理:init、BusyBox init 與 systemd#4": {
  "type": "table",
  "head": [
   "inittab 行",
   "作用"
  ],
  "rows": [
   [
    "::sysinit:/etc/init.d/rcS",
    "開機時執行 rcS 初始化"
   ],
   [
    "ttyAMA0::respawn:getty",
    "序列埠登入,鮑率 115200"
   ],
   [
    "::ctrlaltdel:/sbin/reboot",
    "按下 Ctrl Alt Del 重開機"
   ],
   [
    "::shutdown:/bin/umount",
    "關機時卸載所有檔案系統"
   ],
   [
    "::respawn:/usr/bin/myapp",
    "啟動並監督你的應用程式"
   ]
  ],
  "widths": [
   3,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ]
 },
 "系統啟動與服務管理:init、BusyBox init 與 systemd#5": {
  "type": "cards",
  "reveal": [
   0,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "After",
    "points": [
     "定義啟動順序"
    ]
   },
   {
    "title": "WantedBy",
    "points": [
     "由哪個 target 帶起",
     "如 multi-user.target"
    ]
   },
   {
    "title": "Restart",
    "points": [
     "on-failure",
     "異常結束時自動重啟"
    ]
   },
   {
    "title": "WatchdogSec",
    "points": [
     "搭配硬體看門狗",
     "程式要定期通知 systemd"
    ]
   }
  ]
 },
 "映像檔、套件管理與燒錄#2": {
  "type": "table",
  "head": [
   "形態",
   "說明"
  ],
  "rows": [
   [
    "rootfs.ext4 或 tar",
    "只有根檔案系統"
   ],
   [
    "rootfs.squashfs",
    "唯讀壓縮的根檔案系統"
   ],
   [
    "Image 加 dtb",
    "kernel 與裝置樹,放 FAT 開機分區"
   ],
   [
    "sdcard.img 或 .wic",
    "完整磁碟映像,含分區表"
   ]
  ],
  "widths": [
   2,
   3
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "映像檔、套件管理與燒錄#4": {
  "type": "table",
  "head": [
   "分區",
   "格式",
   "內容"
  ],
  "rows": [
   [
    "1",
    "FAT32",
    "boot:bootloader、kernel、DTB"
   ],
   [
    "2",
    "ext4",
    "rootfs A"
   ],
   [
    "3",
    "ext4",
    "rootfs B,A/B 更新才需要"
   ],
   [
    "4",
    "ext4",
    "data 持久資料"
   ]
  ],
  "widths": [
   1,
   1,
   4
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4
  ]
 },
 "映像檔、套件管理與燒錄#6": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "wic ls",
    "sub": "列出分區",
    "color": 0
   },
   {
    "label": "fdisk -l",
    "sub": "看分區表",
    "color": 1
   },
   {
    "label": "losetup",
    "sub": "掛成 loop 裝置",
    "color": 2
   },
   {
    "label": "mount",
    "sub": "loop3 第二分區到 /mnt",
    "color": 3
   }
  ]
 },
 "映像檔、套件管理與燒錄#7": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   3
  ],
  "nodes": [
   {
    "label": "ls /mnt",
    "sub": "看 rootfs 內容",
    "color": 0
   },
   {
    "label": "umount /mnt",
    "sub": "先卸載",
    "color": 1
   },
   {
    "label": "losetup -d",
    "sub": "釋放 loop 裝置",
    "color": 2
   }
  ]
 }
}