OpenWrt Configuration【OpenWrt配置】Target System (x86) ---> 目标系统(x86)
Subtarget (x86_64) ---> 子目标(x86_64)
Target Profile (Generic) --->目标配置文件(通用)
Target Images ---> 保存目标镜像的格式
Global build settings ---> 全局构建设置
Advanced configuration options (for developers) ---- 高级配置选项(适用于开发人员)
Build the OpenWrt Image Builder 构建OpenWrt图像生成器
Build the OpenWrt SDK构建OpenWrt SDK
Package the OpenWrt-based Toolchain打包基于OpenWrt的工具链
Image configuration --->图像配置
Base system ---> 基本系统
Administration ---> 管理
Boot Loaders --->引导加载程序
Development ---> 开发
Extra packages ---> 额外包
Firmware --->固件
Fonts --->字体
Kernel modules ---> 内核模块
Languages --->语言
Libraries ---> 图书馆
LuCI ---> LuCI
Mail --->邮件
Multimedia --->多媒体
Network --->网络
Sound ---> 声音
Utilities --->实用程序
Xorg --->Xorg
wsl环境
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
sudo vim /etc/ssh/sshd_config
Port 22 #默认即可,如果有端口占用可以自己修改
PasswordAuthentication yes # 允许用户名密码方式登录
sudo /etc/init.d/ssh start
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 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
vim ./feeds.conf.default
添加一行
src-git openclash https://github.com/vernesong/OpenClash.git
找到192.168.1.1 替换默认ip
vi package/base-files/files/bin/config_generate
cd lede
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
博主为j1900编译固件 x86架构
make download -j8 V=s
make V=s -j1
cd lede
git pull
./scripts/feeds update -a && ./scripts/feeds install -a
make defconfig
make -j8 download
make -j$(($(nproc) + 1)) V=s
rm -rf ./tmp && rm -rf .config //可选
make menuconfig
make -j$(($(nproc) + 1)) V=s
如果是添加了其他源,如果你是第二次编译,最好使用make clean命令和 ./scripts/feeds clean命令清除一些障碍,如果是全新安装就无须clean。
make clean
./scripts/feeds clean
rm -rf ./tmp && rm -rf .config //可选
make menuconfig
make -j$(($(nproc) + 1)) V=s
一般来说,用openwrt-x86-64-generic-squashfs-combined.img文件就可以了 编译完成后输出路径:bin/targets
插件比较多的时候,下x86/64下调整一下设置,留下空间
Target Images ---> (16) Kernel partition size (in MB) #默认是 (16) 建议修改 (256)
Target Images ---> (160) Root filesystem partition size (in MB) #默认是 (160) 建议修改 (512)
由于 WSL 的 PATH 中包含带有空格的 Windows 路径,有可能会导致编译失败,请在 make 前面加上:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin