编译LEDE固件和遇到的坑
注意:不要使用root账号编译,不然会有各种各样的问题
安装的系统以debian为例
1.安装依赖
1 2 3 4 5 6 7 8
| sudo apt update -y sudo apt full-upgrade -y sudo 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-multilib g++-multilib \ git gperf haveged help2man intltool libc6-dev-i386 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 libpython3-dev qemu-utils \ rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
|
2.下载源码更新feeds
这里我推荐自己使用的feeds源
1 2 3
| git clone https://github.com/coolsnowwolf/lede cd lede vi feeds.conf.default
|
将以下源替换进去
1 2 3 4 5 6 7 8 9 10
| src-git packages https://github.com/coolsnowwolf/packages src-git luci https://github.com/coolsnowwolf/luci src-git routing https://github.com/coolsnowwolf/routing src-git telephony https://git.openwrt.org/feed/telephony.git #src-git video https://github.com/openwrt/video.git #src-git targets https://github.com/openwrt/targets.git #src-git oldpackages http://git.openwrt.org/packages.git #src-link custom /usr/src/openwrt/custom-feed src-git kenzo https://github.com/kenzok8/openwrt-packages src-git small https://github.com/kenzok8/small
|
1 2 3
| ./scripts/feeds update -a ./scripts/feeds install -a make menuconfig
|
3.配置编译需要的插件
在此选择你需要的luci插件以及你的路由器型号和系统内核,详见官方文档不再赘述
1 2
| make download -j8 make V=s -j1
|
需要注意的点
每次编译后推荐
rm -rf ./tmp