openwrt 系统宏观结构
openwrt目录结构
1. config 存着系统的配置文件
.in —> .config---->编译脚本解析
CONFIG_HAVE_DOT_CONFIG = y 等等
作用:控制整个编译过程,是整个系统的配置文件,如果需要增加新的编译选
项,需要按照config.in文件格式进行设计
Config-build.in //单纯去编译的最基本的配置文件
config-devel.in //用于开发的配置文件,基于源码开发
config-images.in //基于生成某种镜像
config-kernel.in //内核包括文件系统
所有的 .in文件会生成 .config 文件
- config-images.in

/* 镜像不等于编译,bulid后生成的 elf文件 */
*镜像与编译的区别*
elf --> image
对elf文件进行压缩放进镜像体里,把压缩算法的实现放在
镜像头里,运行时,先用自定义格式的内容的镜像头来解
压缩 镜像体,解压后释放进内存里运行
- config-bulid.in
用于管理各种文件,在以后安装模块时用
```bash
menu "Global build settings"
config ALL_NONSHARED
bool "Select all target specific packages by default"
default ALL || BUILDBOT
config ALL_KMODS
bool "Select all kernel module packages by default"
default ALL
config ALL
bool "Select all userspace packages by default"
default n
config BUILDBOT
bool "Set build defaults for automatic builds (e.g. via buildbot)"
default n
help
This option changes several defaults to be more suitable for
automatic builds. This includes the following changes:
- Deleting build directories after compiling (to save space)
- Enabling per-device rootfs support
- 在 .config文件中最关键的是 y 和 n 和其他关键字选项
- 脚本会使用它,#代表注释
# CONFIG_TARGET_ar7 is not set

最低0.47元/天 解锁文章
2109

被折叠的 条评论
为什么被折叠?



