date
related_level
slug
type
relate_date
summary
status
tags
category
last_updated
Nov 10, 2025 10:03 PM
是否已更新
orginal_page
是否推荐
其他路由系统
Openwrt 系统交叉编译
Openwrt 内核
Openwrt 系统固件
ImmortalWrt 可定制
kiddin9 在线定制固件
IStoreOS:简单易上手,自带软件商店
eSir:三个版本,精品小包、高大全、佛跳墙
bleach1991:两个版本,精简版、高大全版
其他
DHDAXCW(骷髅头)(已退坑)
自定义固件差异
ImmortalWrt x86/64 出厂软件 (分支: 23.05.3, 内核: 6.1.82)
kiddin9 x86/64 出厂软件 (分支: 23.05.2 (r27625-416c8c5c91))
交叉编译 Openwrt 系统
- 参考资料
根据平台安装对应工具链
[OpenWrt Wiki] Build system setup[OpenWrt Wiki] Build system setup
This table contains the package name for each build prerequisite in different GNU/Linux and Unix like distributions.
- 以 debian/ubuntu 为例
apt install -y asciidoc bash binutils bzip2 flex git g++ gcc time util-linux gawk gzip help2man intltool libelf-dev zlib1g-dev make libncurses-dev libssl-dev patch perl-modules libthread-queue-any-perl python2-dev python3-dev swig unzip wget gettext xsltproc zlib1g-dev
根据平台安装可能需要但 make config 无法检查到的包依赖
- 仅列举了部分
- 以 debian/ubuntu 为例
apt install -y libboost-dev libxml-parser-perl libusb-dev bin86 bcc sharutils gcc-multilib b43-fwcutter zip
针对特定 Linux 版本的补充
- https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem#linux_gnu-linux_distributions
- 以 Ubuntu 22 为例
apt install -y build-essential clang flex bison g++ gawk \ gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev \ python3-distutils python3-setuptools rsync swig unzip zlib1g-dev file wget
下载 Openwrt 源码
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git pull
选择 Openwrt 特定版本
git branch -a
git tag
git checkout v22.03.7
更新 feeds
./scripts/feeds update -a
./scripts/feeds install -a
配置固件镜像 make menuconfig
- 如何操作:按
y设置<*>标识,按m设置<M>标识,按n设置<>空标识 - 按
/然后输入字符串可以检索 <*>标识将编译并包含在镜像内;<M>标识仅编译但不包含,需要通过opkg进行安装;<>空标识将排除该项
按顺序设置目标系统、架构和配置
- Target system (general category of similar devices)
- 目标系统(类似设备的一般类别)
- Subtarget (subcategory of Target system, grouping similar devices)
- 子目标(目标系统的子类别,分组相似的设备)
- Target profile (each specific device)
- 目标配置文件(每个特定设备)
- Package selection
- 选择需要的软件包
- Build base system settings
- 构建系统设置
- Kernel modules
- 内核模块
- 保存后将根据配置生成
<buildroot>/.config配置文件
或者使用配置文件配置
- 保存配置后创建差异文件
./scripts/diffconfig.sh > diffconfig
- 覆盖
.config cp diffconfig .config
- 也可以添加到底部
cat diffconfig >> .config
构筑固件镜像 make -j$(nproc) defconfig download clean world
- 选项解释
-j$(nproc)并行编译,可能会出错defconfig于默认设置创建一个.config文件,作为后续编译的基础download下载编译过程中需要的所有外部依赖(如软件包源代码)clean用于清理之前编译产生的临时文件和编译输出,为新的干净编译做准备world意味着编译整个系统——包括所有默认启用的包和服务
- 编译成功后,在
<buildroot>/bin/targets/<arch>文件夹内可以找到对应固件镜像
构筑单个软件包
- 以
jsonpath为例 make package/utils/jsonpath/compile V=smake package/utils/jsonpath/{clean,compile} V=s- 重编译
交叉编译 iStoreOS 24.10 版固件
- 参考资料
- 也可直接使用恩山论坛上别人编译好的版本
工具链和依赖参考交叉编译 Openwrt 系统对应部分
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev make4.1+ perl python3.7+ rsync subversion unzip which- 官方提到的依赖项
下载源码
git clone https://github.com/istoreos/istoreos.git
选择特定版本
cd istoreos
git branch -a
git tag
git checkout v24.10.0-rc5
更新 feeds
./scripts/feeds update -a
./scripts/feeds install -a
配置固件镜像 make menuconfig
- 如何操作:按
y设置<*>标识,按m设置<M>标识,按n设置<>空标识 - 按
/然后输入字符串可以检索 <*>标识将编译并包含在镜像内;<M>标识仅编译但不包含,需要通过opkg进行安装;<>空标识将排除该项
按顺序设置目标系统、架构和配置
- Target system (general category of similar devices)
- 目标系统(类似设备的一般类别)
- Subtarget (subcategory of Target system, grouping similar devices)
- 子目标(目标系统的子类别,分组相似的设备)
- Target profile (each specific device)
- 目标配置文件(每个特定设备)
- Package selection
- 选择需要的软件包
- Build base system settings
- 构建系统设置
- Kernel modules
- 内核模块
- 保存后将根据配置生成
<buildroot>/.config配置文件
构筑固件镜像 make -j$(nproc) defconfig download clean world
-j$(nproc)并行编译,可能会出错
defconfig于默认设置创建一个.config文件,作为后续编译的基础
download下载编译过程中需要的所有外部依赖(如软件包源代码)
clean用于清理之前编译产生的临时文件和编译输出,为新的干净编译做准备
world意味着编译整个系统——包括所有默认启用的包和服务
- 编译成功后,在
<buildroot>/bin/targets/<arch>文件夹内可以找到对应固件镜像
- Author:白鸟3
- URL:https://blog.kun2peng.top/develop/openwrt_xbuild
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
