1. 准备一个在 x86_64 上运行的 Linux 操作系统。
2. 确认已为系统安装 GNU make 工具，测试输出：（> 开头为命令的输入，以下部分为输出内容）

```
> make --version
GNU Make 4.4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```

3. 从 OpenWRT 官网下载编译工具链：<https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/openwrt-toolchain-ipq40xx-generic_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst>
4. 解压下载到的编译工具链文件：（设下载到的文件名为 openwrt-toolchain-ipq40xx-generic_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst）

```sh
tar xf openwrt-toolchain-ipq40xx-generic_gcc-13.3.0_musl_eabi.Linux-x86_64.tar.zst
```

5. 确认当前目录是否存在已解压的文件夹（按上例应为 openwrt-toolchain-ipq40xx-generic_gcc-13.3.0_musl_eabi.Linux-x86_64）
6. 在当前 shell 的当前目录导出环境变量：

```sh
export STAGING_DIR="$(pwd)/openwrt-toolchain-ipq40xx-generic_gcc-13.3.0_musl_eabi.Linux-x86_64/toolchain-arm_cortex-a7+neon-vfpv4_gcc-13.3.0_musl_eabi"
export PATH="STAGING_DIR/bin"${PATH:+:$PATH}
```

7. 下载源代码：<https://download.openfogos.com/t/daemon.src.tar>
8. 解包源代码文件：

```sh
tar xf daemon.src.tar
```

7. 在当前 shell 切换到源代码目录（设上一步在当前目录解包）

```sh
cd daemon
```

8. 运行：

```sh
make CC=arm-openwrt-linux-gcc
```

9. 查看当前目录是否生成文件名为 daemon 的文件
