OpenWrt官方(OpenWrt23.05&24.10)SDK编译PassWall教程 #1603
Replies: 26 comments 72 replies
-
|
Hi.. how to install the compiled Ipk? Does I have to upload the Ipk on /tmp or /root folder ? opkg update and opkg install *.ipk on that folder.. is it right ? |
Beta Was this translation helpful? Give feedback.
-
|
I do all of the step above but when i installed it give me an error like this :
#the other ipk can be installed. I used offical sdk openwrt 21.02.1 for my Rpi4 from openwrt website. can you give me a quick guide how to overcome this such error and sorry for not asking in chineese.. Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
bad thing my english is bad so u cna give me a email i seed it to u |
Beta Was this translation helpful? Give feedback.
-
You can reply in chineese sir.. because I can translate it.. sorry for the inconvinience.. where to find your email sir ? |
Beta Was this translation helpful? Give feedback.
-
This is my email ... azimm0044@gmail.com |
Beta Was this translation helpful? Give feedback.
-
|
补充:
|
Beta Was this translation helpful? Give feedback.
-
谢谢大佬答疑,上面部分已经修改,但是我想问一个问题杀毒的进程防护是什么 |
Beta Was this translation helpful? Give feedback.
-
|
win 自己的 defender,似乎还好。 |
Beta Was this translation helpful? Give feedback.
-
|
请教大佬一下,我按照本教程用官方21.02.1的SDK成功编译了passwall,但是在官方21.02.1的image上安装的时候,chinadns-ng和luci-app-passwall这两个ipk不能安装。显示: |
Beta Was this translation helpful? Give feedback.
-
|
按照这个教程一次成功 |
Beta Was this translation helpful? Give feedback.
-
|
./scripts/feeds install luci-app-passwall找不到软件包啊…… |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
各位大佬,编译错误,找不到头绪,求教,万分感谢! |
Beta Was this translation helpful? Give feedback.
-
|
之前应为golang的问题,老是编译失败。 |
Beta Was this translation helpful? Give feedback.
-
|
编译简单,难的是优化配置,同样的插件,同 |
Beta Was this translation helpful? Give feedback.
-
|
使用SDK编译现在不会自动生成dnsmasq-full了,请问现在是不需要dnsmasq-full了吗? |
Beta Was this translation helpful? Give feedback.
-
|
感谢楼主!我终于成功在x86_64的openwrt 21.02.3版本中安装上了passwall,之前尝试了许多方案都有kmod相关不兼容的情况。还得是手动编译啊,在这里顺便把我的成品放上来:https://pan.moseacg.com/s/kpofx 理论上安装x86_64原版21.02.3的openwrt固件(全新安装后请务必扩容,官方默认只有103m的软件空间),ssh依次执行 通过sftp上传压缩包的PWluci和PWpackages文件夹至root目录 即可成功安装passwall |
Beta Was this translation helpful? Give feedback.
-
|
现在OpenWrt最新版本是 22.03,防火墙使用 nftables 代替了 iptables。passwall在OpenWrt 22.03.0中能正常使用吗? |
Beta Was this translation helpful? Give feedback.
-
|
自编译的版本md5和官方的不一样,导致有好多依赖文件无法安装,楼主有解决办法吗?我用官方21.02.3,但是官方的固件没有自带1225网卡驱动,导致我进不去路由器后台,也连接不了ssh |
Beta Was this translation helpful? Give feedback.
-
|
golang我是直接删了,然后从lean的里面复制过去就好了,编译v2ray正常,编译Trojan出错,怎么解決? DCMAKE_INSTALL_PREFIX=/usr - DDL_LIBRARY=/home/ubuntu/7621/staging_dir/target-mipsel_1004kc+dsp_uClibc-1.0.x - DCMAKE_PREFIX_PATH=/home/ubuntu/7621/staging_dir/target-mipsel_1004kc+dsp_uClibc-1.0.x -DCMAKE_SKIP_RPATH=TRUE /home/ubuntu/7621/build_dir/target-mipsel_1004kc+dsp_uClibc-1.0.x/zstd-1.3.8 ) does not appear to contain CMakeLists.txt. 1.3.8/.configured_41825d9aa5a636f310e70efeb403cb98] Error 1 |
Beta Was this translation helpful? Give feedback.
-
|
基于官方的rom(openwrt 22.03.3),规则列表里的代理列别表作增删修改 ,显示“没有待应用的更改“,改动不生效,服务也不重启。 |
Beta Was this translation helpful? Give feedback.
-
|
编译和安装都成功了,就是安装完后,都没打开主开关,就不能上网了,过一会后台也无法连接 |
Beta Was this translation helpful? Give feedback.
-
|
你好,我用docker编译sdk的时候 卡在make menuconfig这里了 menu里面的选项很少 请问这个怎么解决 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
编译出来没有kmod-nft-socket、kmod-nft-tproxy这些依赖怎么办? |
Beta Was this translation helpful? Give feedback.
-
|
有没有办法直接利用openwrt的构建系统直接集成PassWall呢? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
本人是菜鸟。这个是本人自己看网上教程和自己总结书写的一个教程。如果你是和我一样的菜鸟可以参考一下。本人在wsl的ubuntu环境下编译成功了多次。
文章参考:来源
先安装运行环境。自己去看openwrt官网,wsl还需要注意文件路径问题
所有编译环境全局科学上网,全局科学上网,全局科学上网
编译的主要问题,golang 版本版本比较旧,下面会给出解决问题的方法
一.首次编译
#非root账号下载稳定版本的23.05.0SDK(rockchip)
wget https://downloads.openwrt.org/releases/23.05.0/targets/rockchip/armv8/openwrt-sdk-23.05.0-rockchip-armv8_gcc-12.3.0_musl.Linux-x86_64.tar.xz#非root账号下载稳定版本的24.10.0SDK(rockchip)
wget https://downloads.openwrt.org/releases/24.10.0/targets/rockchip/armv8/openwrt-sdk-24.10.0-rockchip-armv8_gcc-13.3.0_musl.Linux-x86_64.tar.zst#更新官方Ubuntu的软件
#解压23.05.0的sdk
tar -Jxf openwrt-sdk-23.05.0-rockchip-armv8_gcc-12.3.0_musl.Linux-x86_64.tar.xz#解压24.10.0的sdk
tar -I zstd -xf openwrt-sdk-24.10.0-rockchip-armv8_gcc-13.3.0_musl.Linux-x86_64.tar.zst#进入SDK根目录
cd openwrt-sdk-23.05.0-rockchip-armv8_gcc-12.3.0_musl.Linux-x86_64#更新了添加包含 PassWall 的2个分支的packages和Luci的 feed (在SDK根目录)
#下载 feeds 源中的软件包源码(在SDK目录下)
./scripts/feeds update -a#feeds 是扩展的软件包,独立于 OpenWrt 源码之外,所以需要单独进行拉取和更新。
#openwrt23更新 golang 到最新版本
#openwrt24更新 golang 到最新版本
#在SDK根目录,强制优先安装passwall_packages中的 feeds 软件包
./scripts/feeds install -a -f -p passwall_packages#在SDK根目录,安装 feeds 中luci-app-passwall的软件包
./scripts/feeds install luci-app-passwall#在SDK根目录,安装 feeds 中luci-app-passwall2的软件包
./scripts/feeds install luci-app-passwall2#因为目前安装极简模式,必须要在feeds中安装luci-base的软件包才能编译luci-i18n-passwall-zh-cn
./scripts/feeds install luci-base编译luci-base
make package/luci-base/compile V=99#默认组件
make defconfig#调整 OpenWrt 系统组件
make menuconfig#[ ] [] [M]的区别[]包括在固件内,[M]是单独的IPK包,一般是选择[M]
编译
#预下载编译所需的软件包
make download -j8 V=s#-j8是指使用8个线程下载,理论上是数字越大下载越快,但似乎有个上限,实测5线程以上其实速度相差不了多少,在网络好的情况下,基本在5分钟以内能下载完
#检查文件完整性
find dl -size -1024c -exec ls -l {} \;#此命令可以列出下载不完整的文件(根据我多次编译的经验得出小于1k的文件属于下载不完整),如果存在这样的文件可以使用find dl -size -1024c -exec rm -f {} ;命令将它们删除,然后重新执行make download下载并反复检查,确认所有文件完整可大大提高编译成功率,避免浪费时间。(如果有问题再次下载)
#这个是清洁编译4线程
make package/luci-app-passwall/{clean,compile} -j4#这个是清洁编译4线程
make package/luci-app-passwall2/{clean,compile} -j4#这个是可以看到具体流程的可以看到错误(推荐首次使用)
make package/luci-app-passwall/compile V=99#如果是第一次编译naiveproxy要先单独编译gn不然会报错
make package/gn/compile V=99#这个是效率和容错平衡的2线程
make package/luci-app-passwall/{clean,compile} -j2给一个傻瓜指令
make download -j8 V=s && find dl -size -1024c -exec ls -l {} \; && make package/luci-app-passwall/{clean,compile} -j4生成 index 和签名 (可以操作)
make package/index二.更新以后再次编译
#先清空上次编译的软件包源码
make clean#有大版本的软件更新可以这样清空
./scripts/feeds clean#如果还是失败可以尝试
rm -rf ./feeds && rm -rf ./tmp && ./scripts/feeds update -a && ./scripts/feeds install luci-app-passwall && make menuconfig#下载 feeds 源中的软件包源码
./scripts/feeds update -a#feeds 是扩展的软件包,独立于 OpenWrt 源码之外,所以需要单独进行拉取和更新。
#在SDK根目录,强制优先安装passwall_packages中的 feeds 软件包
./scripts/feeds install -a -f -p passwall_packages#在SDK根目录,安装 feeds 中luci-app-passwall的软件包
./scripts/feeds install luci-app-passwall#默认组件
make defconfig#调整 OpenWrt 系统组件
make menuconfig单个ipk编译
如果更新了xray-core,那么只需要运行下面
make package/xray-core/compile V=99同理类推如果更新了hysteria
make package/hysteria/compile V=99同理类推如果更新了naiveproxy
make package/naiveproxy/compile V=99同理类推如果更新了shadowsocksr
make package/shadowsocksr-libev/compile V=99同理类推如果更新了sing-box
make package/sing-box/compile V=99全部编译
#预下载编译所需的软件包
make download -j8 V=s#-j8是指使用8个线程下载,理论上是数字越大下载越快,但似乎有个上限,实测5线程以上其实速度相差不了多少,在网络好的情况下,基本在5分钟以内能下载完
#检查文件完整性
find dl -size -1024c -exec ls -l {} \;#此命令可以列出下载不完整的文件(根据我多次编译的经验得出小于1k的文件属于下载不完整),如果存在这样的文件可以使用find dl -size -1024c -exec rm -f {} ;命令将它们删除,然后重新执行make download下载并反复检查,确认所有文件完整可大大提高编译成功率,避免浪费时间。(如果有问题再次下载)
#这个是清洁编译4线程
make package/luci-app-passwall/{clean,compile} -j4#这个是可以看到具体流程的可以看到错误(推荐首次使用)
make package/luci-app-passwall/compile V=99#这个是效率和容错平衡的2线程
make package/luci-app-passwall/{clean,compile} -j2给一个傻瓜指令
make download -j8 V=s && find dl -size -1024c -exec ls -l {} \; && make package/luci-app-passwall/{clean,compile} -j4给一个luci-app-ssr-plus傻瓜指令
make download -j8 V=s && find dl -size -1024c -exec ls -l {} \; && make package/luci-app-ssr-plus/{clean,compile} -j4#进入make menuconfig
make menuconfig#进入全局设置,如下面所示,然后保存,退出
如果不全点或者没有点好其中一个,可能导致后面的Passwall没有带中文ipk
三.安装 Passwall软件
先更新软件源,移除dnsmasq,安装dnsmasq-full, kmod-nft-socket、kmod-nft-tproxy、kmod-nft-nat等FW4依赖包
根据luci-app-passwall在make defconfig选好的安装选项进行上传相关的ipk
将编译好的passwall和passwall_packages文件夹内的ipk(包括luci-app-passwall和luci-i18n-passwall-zh-cn)上传到路由器的tmp文件夹内,然后安装
opkg install /tmp/*.ipk三.再次安装
相关的软件安装需要先在luci软件包中卸载既往安装的luci-app-passwall和luci-i18n-passwall-zh-cn,然后路由器重启,再putty链接路由器相关文件夹删除历史文件(可能位置会更新)
最后再看一下
/usr/lib/lua/luci/controller/passwall将编译好的passwall和passwall_packages文件夹内的ipk(包括luci-app-passwall和luci-i18n-passwall-zh-cn)上传到路由器的tmp文件夹内,然后安装
opkg install /tmp/*.ipk最后在客户端启动前先在luci运行一下恢复默认配置,运行配置文件/etc/config/passwall,恢复默认配置/usr/share/passwall/0_default_config。
更新日志:
2022.2.27
-更新了upx的安装方法,默认安装加入了wget-ssl解决4.50以后opkg update报错问题。
-目录优化。
-目前在Ubuntu20.4和最新的openwrt21.02.2编译成功
2022.3.15
-更新了添加包含 PassWall 的packages和Luci的 feed
2022.5.28
-目前不需要upx,故删除相关指令。
2022.9.11
-更新了22.03.0的iptables兼容的方法
-使用22.03.0的golong,解决最新版本v2ray-core的golong语言问题
-其他一些小问题优化
2022.12.9
-强制优先安装PWpackages中的 feeds 软件包
2023.10.21
-更新到23.05
2025.02.23
-更新到24.10
Beta Was this translation helpful? Give feedback.
All reactions