在 x86 平台编译可直接参考官方文档,在 arm 平台编译需要略作修改
X86 平台 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 apt update -y apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache clang cmake cpio curl device-tree-compiler flex gawk gcc-multilib g++-multilib gettext \ genisoimage git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev \ libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev \ libreadline-dev libssl-dev libtool llvm lrzsz msmtp ninja-build p7zip p7zip-full patch pkgconf \ python3 python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion \ swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev git clone https://github.com/coolsnowwolf/lede --depth=1 cd lede./scripts/feeds update -a ./scripts/feeds install -a make menuconfig make download -j$(nproc ) make V=s -j$(nproc )
编译后固件位于./bin/targets
ARM 平台 总体上与 X86 一样,安装依赖:
1 2 3 4 5 6 apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-arm-linux-gnueabihf \ g++-arm-linux-gnueabihf git golang gperf haveged help2man intltool libelf-dev libglib2.0-dev \ libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip qemu-utils \ rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
修改配置Languages > Go > Configuration > External bootstrap Go root directory,填/usr/lib/go
1 (/usr/lib/go) External bootstrap Go root directory
否则编译会报错
编译 easytier 插件 1 2 3 4 5 git clone https://github.com/EasyTier/luci-app-easytier --depth=1 cp -r luci-app-easytier/luci-app-easytier feeds/luci/applicationsrm -rf luci-app-easytier./scripts/feeds update -a ./scripts/feeds install -a
配置时在LuCI > Applications里勾选luci-app-easytier
参考 https://winger.alundra.uk/index.php/archives/8/
https://github.com/coolsnowwolf/lede