Skip to content

Instantly share code, notes, and snippets.

@luoqeng
Last active February 7, 2023 01:55
Show Gist options
  • Save luoqeng/ad535fca4a87a1cfb9a9c1def151b837 to your computer and use it in GitHub Desktop.
Save luoqeng/ad535fca4a87a1cfb9a9c1def151b837 to your computer and use it in GitHub Desktop.

phicomm-k3 compile

官方原版 19.07 + luci-app-ssr-plus, 选 ssr-plus 透明代理简单

编译在全局翻墙环境下进行,或者在海外高配 VPS 上

编译环境配置

sudo apt install build-essential libncursesw5-dev python unzip  #ubuntu 18.04 or later  

git clone https://github.com/coolsnowwolf/lede.git

git clone https://github.com/openwrt/openwrt.git

cd openwrt && git checkout openwrt-19.07

cp ../lede/package/lean/ package/ -R

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

只编译 k3

sed -i 's|^TARGET_|# TARGET_|g; s|# TARGET_DEVICES += phicomm-k3|TARGET_DEVICES += phicomm-k3|' target/linux/bcm53xx/image/Makefile

编译配置

make menuconfig 

Target 选 Broadcom BCM47xx/53xx (ARM)

Target Profile 选 PHICOMM K3

luCI–>Applictions–>luci-app-ssr-plus

检查配置 预先下载 (可选)

make defconfig

make download

开始编译, 8=线程数,V=99 生成固件并显示每一步及正确性,V=s:生成固件忽略不影响固件主功能的错误

make -j8 V=99 

编译完成后固件输出在 openwrt/bin/targets

刷机,上传到路由 /tmp

mtd -r write /tmp/k3.trx firmware

编译指定 ipk

make V=99 package/lean/luci-app-ssr-plus/compile

开启 luci-app-ssr-plus,官版不需要

echo 0xDEADBEEF > /etc/config/google_fu_mode

可选更换 k3 无线驱动

mv xxxx.bin.xx  brcmfmac4366c-pcie.bin  && cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/ 

无线驱动

参考

TODO

需要强制安装 luci-app-ssr-plus, ssr 依赖 kcptun-client,但是目前编译出来的的包是 kcptun-c,包名与可执行文件不符合要求,需更改成 kcptun-clinet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment