本文最后更新于 2023-09-05,文章内容可能已经过时!

Github:骷髅头

Github:openwrt常用软件包

一、环境配置

更新系统

sudo apt update -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 vpnc \\
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz aria2 lib32gcc-s1 \\
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 libfuse-dev

克隆项目(5.4分支)

git clone https://github.com/DHDAXCW/lede-rockchip -b 5.4

进入目录

cd lede-rockchip

更新软件包

./scripts/feeds update -a && ./scripts/feeds install -a

配置编译项目

make menuconfig

其他软件包(可能有些包没依赖编译有问题)

sed -i '$a src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default
sed -i '$a src-git small https://github.com/kenzok8/small' feeds.conf.default

更新软件包

./scripts/feeds update -a && ./scripts/feeds install -a

配置编译项目

make menuconfig

二、开始编译

下载DL资料库

make -j8 download V=s

单线程编译

make -j1 V=s

多线程编译

make -j$(nproc) V=s

三、二次编译

git pull
//更新分支

./scripts/feeds update -a && ./scripts/feeds install -a
//更新软件包

make defconfig
//配置项目

make -j8 download
//下载DL资料库

重新配置编译

rm -rf ./tmp && rm -rf .config
//删除编译缓存和配置文件

make menuconfig
//重新配置编译项目