群晖的设备树About DT(Device Tree)

Terminology

  • dt: device tree
  • dts: device tree source
    • The dts file is an ASCII text description of the Device Tree.
  • dtc: device tree compiler
    • DTC is a compilation tool that can compile .dts files into .dtb files.
  • dtb: device tree blob
    • DTC compiles the binary file (*.dtb) generated by *.dts. When the bootloader boots the kernel, it will pre-read *.dtb into the memory and then be parsed by the kernel.

Tools

dtc_64bit.exe.gz windows_x64
dtc_arm.gz
dtc_aarch64.gz
dtc_i686.gz
dtc_x86_64.gz

DSM’s DT

  1. Newly released models from Synology have basically switched to using the device tree.
  2. The disk order of device tree models is easier to control than the traditional method.
  3. But the issue with the current DSM 4.x kernel DT model HBA has not been resolved yet.

Custom DTS

1. Get the current dts file:

arpl will make a dts file (/addons/model.dts) at startup based on the actual hardware conditions. When the DSM system is installed, a backup will be kept in /etc/model.dtb, so I provide two ways to get it.

1.1. P1 (when not installed)


通过 telnet 连接到DSM系统
执行以下命令将上传 model.dts 到 transfer网盘, 再通过transfer返回的地址下载到本地计算机.

curl -sSL --insecure -w '\n' --upload-file /addons/model.dts https://transfer.sh


1.2. P2 (when installed)
打开 SSH


sudo -i
curl -kL https://github.com/RROrg/rr/files/14824625/dtc_x86_64.gz -o ~/dtc_x86_64.gz
gzip -dc ~/dtc_x86_64.gz >~/dtc
chmod +x ~/dtc
~/dtc -I dtb -O dts /etc/model.dtb >  ~/model.dts
curl -sSL --insecure -w '\n' --upload-file ~/model.dts https://transfer.sh

2. Edit dts file:

2.1 Get drive disk data.

# sata
cat /sys/block/sata*/device/syno_block_info
# nvme
cat /sys/block/nvme*/device/syno_block_info

2.2. You need to replenish uninserted disk data as needed.


3. Use custom dts:

发表回复