Skip to content

1. How to compile packages and build firmware

CC edited this page Sep 15, 2024 · 1 revision

How to compile packages

  • 使用OpenWrt SDK[推荐]
  • 使用OpenWrt源码[不推荐, 因为需要下载大量源码并编译toolchains, 导致速度很慢]

compile packages for Google wifi using OpenWrt SDK

  1. 准备编译环境,详见openwrt官网
  2. wget https://downloads.openwrt.org/releases/23.05.4/targets/ipq806x/chromium/openwrt-sdk-23.05.4-ipq806x-chromium_gcc-12.3.0_musl_eabi.Linux-x86_64.tar.xz
  3. tar -Jxf openwrt-sdk-23.05.4-ipq806x-chromium_gcc-12.3.0_musl_eabi.Linux-x86_64.tar.xz
  4. cd openwrt-sdk-23.05.4-ipq806x-chromium_gcc-12.3.0_musl_eabi.Linux-x86_64
  5. echo "src-git wfbng https://github.com/OpenIPC/wfb-ng-openwrt.git^0f2bc01cdda4af9f63d9c5b48874d3ccdf8a49c6" >> feeds.conf.default
  6. ./scripts/feeds update -a
  7. ./scripts/feeds install -a
  8. make package/wfb-ng/compile
  9. save & exit in menuconfig
  10. package ipks will be in bin/packages/arm_cortex-a15_neon-vfpv4/wfbng/ if compile success

Tips: commit id 0f2bc01cdda4af9f63d9c5b48874d3ccdf8a49c6 should change to the version you want compile

How to build firmware

  • 使用OpenWrt imagebuilder[推荐]
  • 使用OpenWrt源码[不推荐, 因为无法兼容官方仓库提供的内核相关软件包]

Build firmware for Qihoo C301 using OpenWrt imagebuilder

  1. 下载imagebuilder并解压wget https://downloads.openwrt.org/releases/23.05.4/targets/ath79/generic/openwrt-imagebuilder-23.05.4-ath79-generic.Linux-x86_64.tar.xz
  2. 将wfb相关的ipk安装包拷贝至packages目录下
  3. make info查看路由器配置文件的名称
  4. make image PROFILE=qihoo_c301 PACKAGES="wfb-gs kmod-usb-net-rndis luci luci-app-firewall luci-app-opkg luci-base luci-light luci-mod-admin-full luci-mod-network luci-mod-status luci-mod-system luci-proto-ipv6 luci-proto-ppp luci-ssl luci-theme-bootstrap", 如果路由器没有USB口或不需要USB推流,则无需要安装kmod-usb-net-rndis,仅作为接收wfb-{keygen,tx,tx-cmd}是可选的
  5. 查看生成的固件 ls bin/targets/*/generic/

Tips: 其他一些实用的软件包 lrzsz usbutils fdisk exfat-mkfs exfat-fsck kmod-fs-exfat kmod-fs-vfat dosfstools ip-full ifstat tcpdump socat

Clone this wiki locally