项目作者: easybe

项目描述 :
Tiny Synology DiskStation daemon
高级语言: Python
项目地址: git://github.com/easybe/synd.git
创建时间: 2020-04-27T21:42:19Z
项目社区:https://github.com/easybe/synd

开源协议:MIT License

下载


Tiny Synology DiskStation daemon

This very basic service was created for a Synology DiskStation DS214+ running
Debian (Bookworm). It should also work on other Synology NAS products like the
DS414 or the DS207.

The daemon will turn off the blinking LED at startup and shut the system down
when the power button is pressed.

Installation:

  1. git clone https://github.com/easybe/synd.git /usr/local/synd
  2. pip3 install -r /usr/local/synd/requirements.txt
  3. systemctl enable /usr/local/synd/synd.service
  4. systemctl start synd

In order for the device to actually power off, we need to enable the
qnap-poweroff driver. Also, to preserve the MAC addresses set by U-Boot, the
mvneta driver must be compiled into the kernel.

The Linux kernel I cross-compile as follows using
a Docker image:

  1. apt source linux
  2. cd linux-*
  3. cp /path/to/old/config .config
  4. sed -i 's/CONFIG_MVNETA=m/CONFIG_MVNETA=y/' .config
  5. sed -i 's/.*CONFIG_POWER_RESET_QNAP.*/CONFIG_POWER_RESET_QNAP=y/' .config
  6. sed -i 's/CONFIG_SYSTEM_TRUSTED_KEYS=.*/CONFIG_SYSTEM_TRUSTED_KEYS=""/' .config
  7. export ARCH=arm
  8. export CROSS_COMPILE=arm-linux-gnueabihf-
  9. export LOCALVERSION=-armmp-lpae
  10. export KDEB_PKGVERSION=$(make kernelversion)-1+custom
  11. make oldconfig
  12. make -j $(nproc) bindeb-pkg