WarmGrayMatteInkMistClaySage
RELIEF · DIAGRAMS

Five diagram shapes五种框图

A block is a thing. A groove is a relationship. Once those two are fixed, most technical diagrams are a matter of arranging them — and the reader never needs a legend.凸块是一个东西,凹槽是一种关系。这两样定下来之后,多数技术框图就只是怎么摆的问题 —— 而且读者永远不需要图例。

Five diagram shapes五种框图

Drawing diagrams in this style needs two things the control kit does not give you. Connectors are grooves — inset, so the line reads as cut into the surface rather than laid on top. And arrowheads and stroke ends are raised with a paired filter: drop-shadow(), because an SVG stroke does not take box-shadow at all — the recipe that lifts every HTML block has no effect on the element a diagram is mostly made of.用这个风格画框图,要多两件控件集里没有的东西。连线是凹槽 —— 加 inset,线就读作刻进面料,而不是搭在上面。箭头和线端靠成对的 filter: drop-shadow() 浮起,因为 SVG 描边根本吃不到 box-shadow —— 那个把每个 HTML 方块顶起来的配方,对框图里占比最大的元素完全没作用。

PIPELINE流程链
schematic电路信息
device tree source设备树文件
kernel parses it内核解析
driver matches驱动匹配
TREE树状结构
/ root node/ 根节点
cpu
memory
cpu@0
compatible
soc
reg
gpio0
reg
i2c0
status
BEFORE / AFTER左右对比
Before: hardware facts hard-coded in the driver以前:硬件信息写死在驱动里
a new board means editing code换个板子就要改代码
a pile of board files under arch/arm/mach-xxxarch/arm/mach-xxx 一堆板级文件
Now: hardware facts live in the device tree现在:硬件信息写在 DTS 里
one driver for all驱动通用
a new board means editing the DTS换板子只改 DTS
CALL LAYERS分层调用
1Application应用程序open / read / write
2System call系统调用sys_read
3VFS layerVFS 层file_operations
4Driver op驱动函数my_drv_read
STRUCT FIELDS · implemented ones rise, unimplemented ones sink结构体字段 · 实现了的亮起,没实现的凹下去
owner
open
read
write
llseek
poll
unlocked_ioctl
mmap
release
fsync
flush
fasync