wsl ubuntu使用openwrt稳定版固件编译lean

因为lean的软件包对新版luci支持不好,所以需要替换为旧版,另外wsl的环境变量有问题,需要手动更改

首先安装依赖包。

sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf

然后进行移植。

cd ~
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
export https_proxy=http://127.0.0.1:1080
export http_proxy=http://127.0.0.1:1080
git clone https://github.com/project-openwrt/lean-lede.git
git clone https://github.com/openwrt/openwrt.git
cp -a ~/lean-lede/package/lean ~/openwrt/package/lean
cd ~/openwrt
cp feeds.conf.default feeds.conf.default.bak
sed -i 's/https:\/\/git.openwrt.org\/project\/luci.git/https:\/\/github.com\/coolsnowwolf\/luci/g' feeds.conf.default
sed -i 's/16384/65536/g' ./package/kernel/linux/files/sysctl-nf-conntrack.conf
cd ./package/lean
git clone https://github.com/P0lari5/luci-app-ssr-plus.git
cd ~/openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig

配置完成后开始编译即可

make -j8 download
make -j1 V=s

你可能感兴趣的:(lede)