编译Lean OPENWRT

注意
不要用 root 用户进行编译
国内用户编译前最好准备好梯子
默认登陆IP 192.168.1.1 密码 password
X86注意编译丰富插件时,一定记得去<Target Images>选项中,下拉到最后,修改默认<Kernel partition size>和<Root filesystem partition size>
大小,前者建议选择256,后者建议选择512,留足后期装插件的空间,默认是16和160,编译出来丰富插件的固件会遇到无限重启的Bug
编译命令
首先装好 Linux 系统,推荐 Debian 11 或 Ubuntu LTS
安装编译依赖

    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-pyelftools \
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
vim wget xmlto xxd zlib1g-dev python3-setuptools

下载源代码,更新 feeds 并选择配置

    git clone https://github.com/coolsnowwolf/lede
cd lede
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig

下载 dl 库,编译固件 (-j 后面是线程数,第一次编译推荐用单线程)

make download -j8
make V=s -j1

二次编译:

    cd lede
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make V=s -j$(nproc)

如果需要重新配置:

    rm -rf ./tmp && rm -rf .config
make menuconfig
make V=s -j$(nproc)

编译完成后输出路径:bin/targets

相关链接:
Lean GitHub

op固件说明.png

  没有贴标签=、=

  • 上一篇: openwrt一带配置备份整个固件
  • 下一篇: Typecho友链插件无法启用(启动报错并提示:数据表建立失败,友情链接插件启用失败。错误号:42S01)
  • 添加新评论

    icon_question.gificon_razz.gificon_sad.gificon_evil.gificon_exclaim.gificon_smile.gificon_redface.gificon_biggrin.gificon_surprised.gificon_eek.gificon_confused.gificon_cool.gificon_lol.gificon_mad.gificon_twisted.gificon_rolleyes.gificon_wink.gificon_idea.gificon_arrow.gificon_neutral.gificon_cry.gificon_mrgreen.gif