CBuild 暂停开发新特性,请升级到 Cbuild-ng, Cbuild-ng 和 Cbuild 不完全兼容。
CBuild 编译系统是一个比 Buildroot 更强大灵活,比 Yocto 更快速简洁的编译系统。他没有陡峭的学习曲线,也没有定义新的语言,比 Buildroot 和 Yocto 更易于理解和使用。
CBuild 编译系统主要由三部分组成: 任务分析处理工具、Makefile 编译模板、网络和缓存处理工具。
gen_build_chain.py
分析组装
make menuconfig
选择是否执行任务和配置任务参数Makefile
CMake
Autotools
Meson
脚本以实现对它们的支持gen_depends_image.sh
process_machine.sh
toolchain/Makefile
inc.env.mk
inc.app.mk
,支持 C(*.c
) C++(*.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C
) 和 汇编(*.S *.s *.asm
) 混合编译inc.mod.mk
,支持 C(*.c
) 和 汇编(*.S
) 混合编译inc.ins.mk
inc.conf.mk
exec_patch.sh
fetch_package.sh
process_cache.sh
inc.cache.mk
本工程目前已向 Linux 内核社区贡献了2次提交,已合并到 Linux 内核主线
kconfig: fix failing to generate auto.conf
commit 1b9e740a81f91ae338b29ed70455719804957b80
Author: Jing Leng <[email protected]>
Date: Fri Feb 11 17:27:36 2022 +0800
kconfig: fix failing to generate auto.conf
When the KCONFIG_AUTOCONFIG is specified (e.g. export \
KCONFIG_AUTOCONFIG=output/config/auto.conf), the directory of
include/config/ will not be created, so kconfig can't create deps
files in it and auto.conf can't be generated.
kbuild: Fix include path in scripts/Makefile.modpost
commit 23a0cb8e3225122496bfa79172005c587c2d64bf
Author: Jing Leng <[email protected]>
Date: Tue May 17 18:51:28 2022 +0800
kbuild: Fix include path in scripts/Makefile.modpost
When building an external module, if users don't need to separate the
compilation output and source code, they run the following command:
"make -C $(LINUX_SRC_DIR) M=$(PWD)". At this point, "$(KBUILD_EXTMOD)"
and "$(src)" are the same.
If they need to separate them, they run "make -C $(KERNEL_SRC_DIR)
O=$(KERNEL_OUT_DIR) M=$(OUT_DIR) src=$(PWD)". Before running the
command, they need to copy "Kbuild" or "Makefile" to "$(OUT_DIR)" to
prevent compilation failure.
So the kernel should change the included path to avoid the copy operation.
make menuconfig
修改 rootfs (增加包、删除包、修改配置等)命令说明
conf/local.conf
conf/bblayers.conf
和层下的配方文件和配方附加文件# Normal Build
gen_build_chain.py -m MAKEFILE_OUT -k KCONFIG_OUT [-t TARGET_OUT] [-a DEPENDS_OUT] -d DEP_NAME [-v VIR_NAME] [-c CONF_NAME] -s SEARCH_DIRS [-i IGNORE_DIRS] [-g GO_ON_DIRS] [-l MAX_LAYER_DEPTH] [-w KEYWORDS] [-p PREPEND_FLAG] [-u UNIQUE_PACKAGES]
# Yocto Build Step1
gen_build_chain.py -k KCONFIG_OUT -t TARGET_OUT [-v VIR_NAME] [-c CONF_NAME] [-i IGNORE_DIRS] [-l MAX_LAYER_DEPTH] [-w KEYWORDS] [-p PREPEND_FLAG] [-u USER_METAS]
# Yocto Build Step2
gen_build_chain.py -t TARGET_PATH -c DOT_CONFIG_NAME -o RECIPE_IMAGE_NAME [-p $PATCH_PKG_PATH] [-i IGNORE_RECIPES]
Normal Build 命令选项
-m <Makefile Path>
: 指定自动生成的 Makefile 文件路径名
make $(ENV_BUILD_JOBS) $(ENV_MAKE_FLAGS) MAKEFLAGS= all_targets
多线程编译所有包jobserver
,见下面章节说明make time_statistics
-k <Kconfig Path>
: 指定自动生成的 Kconfig 文件路径名-t <Target Path>
: 指定自动生成的存储包名和源码路径列表的文件路径名-a <Depends Path>
: 指定自动生成的存储包名和依赖列表的文件路径名-d <Search Depend Name>
: 指定要搜索的依赖文件名(含有依赖规则语句),依赖文件中可以包含多条依赖信息-c <Search Kconfig Name>
: 指定要搜索的 Kconfig 配置文件名(含有配置信息)
-v <Search Virtual Depend Name>
: 指定要搜索的虚拟依赖文件名(含有虚拟依赖规则语句)-s <Search Directories>
: 指定搜索的目录文件路径名,多个目录使用冒号隔开-i <Ignore Directories>
: 指定忽略的目录名,不会搜索指定目录名下的依赖文件,多个目录使用冒号隔开-g <Go On Directories>
: 指定继续搜索的的目录文件路径名,多个目录使用冒号隔开
<Search Depend Name>
,<Go On Directories>
没有指定或当前目录不在它里面,不会再继续搜索当前目录的子目录-l <Max Layer Depth>
: 设置 menuconfig 菜单的最大层数,0 表示菜单平铺,1表示2层菜单,...-w <Keyword Directories>
: 设置 menuconfig 菜单的忽略层级名,如果路径中的目录匹配设置值,则这个路径的层数减1,设置的多个目录使用冒号隔开-p <Prepend Flag>
: 设置生成的 Kconfig 中配置项的前缀,如果用户运行 conf / mconf 时设置了无前缀 CONFIG_=""
,则运行此脚本需要设置此 flag 为 1-u <Unique Packages>
: 指定唯一包(即此包作为 native 包的依赖时,此包的形式还是不含 native),一般是和 arch 无关的包,多个包名使用冒号隔开-k <Kconfig Path>
: 指定自动生成的 Kconfig 文件路径名-t <Target Path>
: 指定自动生成的存储包名和源码路径列表的文件路径名-c <Search Kconfig Name>
: 指定要搜索的 Kconfig 配置文件名(含有配置信息)
配方名.bbconfig
文件,找不到才在 bbappend 文件中 EXTERNALSRC 变量指定的路径下查找配置文件,优先查找和配置文件名相同后缀的文件名为包名的配置文件,找不到才查找指定配置文件-v <Search Virtual Depend Name>
: 指定要搜索的虚拟依赖文件名(含有虚拟依赖规则语句)-i <Ignore Directories>
: 指定忽略的目录名,不会搜索指定目录名下的依赖文件,多个目录使用冒号隔开-l <Max Layer Depth>
: 设置 menuconfig 菜单的最大层数,0 表示菜单平铺,1表示2层菜单,...-w <Keyword Directories>
: 设置 menuconfig 菜单的忽略层级名,如果路径中的目录匹配设置值,则这个路径的层数减1,设置的多个目录使用冒号隔开-p <Prepend Flag>
: 设置生成的 Kconfig 中配置项的前缀,如果用户运行 conf / mconf 时设置了无前缀 CONFIG_=""
,则运行此脚本需要设置此 flag 为 1-u <User Metas>
: 指定用户层,多个层使用冒号隔开。只有用户层的包才会: 分析依赖关系,默认选中,托管 Kconfig,支持 EXTRADEPS
特殊依赖和虚拟依赖-t <Target Path>
: 指定 Step1 自动生成的存储包名、和源码路径列表的文件路径名-c <Search Kconfig Path>
: 指定配置文件 .config 的路径名-o <Output Recipe Path>
: 指定存储 rootfs 安装包列表的文件路径名-p <Output patch/unpatch Path>
: 指定存储使能的打/去补丁包列表的文件路径名,prepare-patch
包 include 此文件-i <Ignore Recipes>
: 指定的是忽略的配方名,多个配方名使用冒号隔开实依赖格式: #DEPS(Makefile_Name) Target_Name(Other_Target_Names): Depend_Names
包含子路径格式: #INCDEPS: Subdir_Names
格式说明
make -f Makefile_Name
)
/
),支持直接查找子文件夹下的子包
test1/
or test2/wrapper.mk
#INCDEPS: test1 test2/test22
,通过子文件夹下的依赖文件找到子包${ENV_BUILD_SOC}
会替换为环境变量 ENV_BUILD_SOC 的值ignore
关键字是特殊的ID,表示此包不是一个包,用来屏蔽当前目录的搜索,一般写成 #DEPS() ignore():
prepare
关键字是特殊的实目标,表示 make 前运行 make prepare,一般用于当 .config 不存在时加载默认配置到 .configpsysroot
关键字是特殊的实目标,表示使用 OUT_PATH 的 sysroot 而不是 ENV_TOP_OUT 下的 sysroot / sysroot-nativerelease
关键字是特殊的实目标,表示安装进 fakeroot rootfs 时运行 make release,此目标不需要安装头文件和静态库文件等
union
关键字是特殊的虚拟目标,用于多个包共享一个 Makefile
prepare all install clean release
等目标的名字变为 Target_Name-prepare Target_Name-all Target_Name-install Target_Name-clean Target_Name-release
native
关键字是特殊的虚拟目标,表示同时定义了包的交叉编译包和本地编译包cache
关键字是特殊的虚拟目标,表明该包支持缓存机制jobserver
关键字是特殊的虚拟目标,表示 make 后加上 $(ENV_BUILD_JOBS)
,用户需要 export ENV_BUILD_JOBS=-jn
才会启动多线程编译
subtarget1:subtarget2:...::dep1:dep2:...
是特殊语法格式,用来显式指定子目标的依赖
\
续行注: 包的名称ID (Target_Name Depend_Names) 由 小写字母、数字、短划线 组成;Other_Target_Names 无此要求,还可以使用 %
作为通配符
make 包名
先编译某个包的依赖包(有依赖时)再编译这个包make 包名_single
有依赖时才有这类目标,仅仅编译这个包make 包名_目标名
先编译某个包的依赖包(有依赖时)再编译这个包的特定目标(特定目标需要在 Other_Target_Names 中定义)make 包名_目标名_single
有依赖时才有这类目标,仅仅编译这个包的特定目标(特定目标需要在 Other_Target_Names 中定义)DEPENDS
: 编译时依赖的包名
包名-native
,例如 bash-native
RDEPENDS:${PN}
: 运行时依赖的包名
inherit weakdep
weakdep
类会解析 ENV_CFG_ROOT 目录下的 .config
文件,根据是否选中此项来设置 DEPENDS
和 RDEPENDS:${PN}
PACKAGECONFIG
: 动态设置是否依赖安装了 xxx/usr/lib/pkgconfig/xxx.pc
的依赖包虚依赖格式 #VDEPS(Virtual_Type) Target_Name(Other_Infos): Depend_Names
Virtual_Type : 必选,表示虚拟包的类型,目前有 4 种类型
menuconfig
: 表示生成 menuconfig
虚拟包,当前目录(含子目录)下的所有的包强依赖此包,且处于该包的菜单目录下config
: 表示生成 config
虚拟包menuchoice
: 表示生成 choice
虚拟包,当前目录(含子目录)下的所有的包会成为 choice 下的子选项choice
: 表示生成 choice
虚拟包,Other_Infos 下的包列表会成为 choice 下的子选项Virtual_Name : 必选,虚拟包的名称
Other_Infos : choice 类型必选,其它类型可选
/
开头的路径名项(可选),表示作用于指定的子目录而不是当前目录
/virtual
(virtual 可以是任意单词),此时虚拟项目在当前目录(而不是上层目录)下显示Depend_Names : 可选,依赖项列表,和 #DEPS
语句用法基本相同,例如可以设置 unselect
,choice 和 menuchoice 类型不支持 select 和 imply
\
续行注: 虚依赖是指该包不是实际的包,不会参与编译,只是用来组织管理实际包,Normal Build 和 Yocto Build 编译虚拟包的写法和使用规则相同
*depname
: 表示此依赖包是虚拟包 depname,去掉 *
后 depname 还可以有特殊符,会继续解析,例如 *&&depname
finally
: 表示此包编译顺序在所有其它包之后,一般用于最后生成文件系统和系统镜像,只用在Normal Build 的强依赖中unselect
: 表示此包默认不编译,即 default n
,否则此包默认编译,即 default y
nokconfig
: 表示此包不含 Kconfig 配置。同一目录有多个包时,此包无需设置 nokconfig
,而其它包也有配置可以将配置的文件名设为 包名.配置的后缀 ,否则需要设置 nokconfigkconfig
: 表示多个包共享相同的 Kconfig,一般是同一个软件的交叉编译包和本地编译包共享!depname
: 表示此包和 depname 包冲突,无法同时开启,即 depends on !depname
&depname
or &&depname
: 表示此包弱/强选中 depname 包,即 imply depname
/ select depname
?depname
or ??depname
: 表示此包弱依赖 depname 包,即 if .. endif
depa|depb
or depa||depb
: 表示此包弱依赖 depa depb ...
|
||
前面的单词会被隐式推导使用预编译包或源码包中选一,例如 ||libtest
被隐式推导为 prebuild-libtest||libtest
& ?
: &
可以和 ?
组合使用,不要求组合顺序,表示选中并弱依赖
&&??depname
或 ??&&depname
等表示强选中弱依赖,??&depname
或 &??depname
等表示弱依赖弱选中& |
: &
可以和 |
组合使用,表示选中其中一个包并弱依赖所有实包
|
||
前面的字符直到 &
被隐式推导为 *build-包名 prebuild-包名 包名
三元组&&||libtest
被隐式推导为 &&*build-libtest||prebuild-libtest||libtest
&&*build-libtest||prebuild-libtest||libtest
表示强选中这三个包中第一个存在的包,并弱依赖后面两个实包depname@condition
or depname@@condition
: condition 为 y 且 depname 选中时,此包才依赖 depname,只用在 Normal Build 中?
??
没有区别,|
||
没有区别,@
@@
没有区别?
|
@
中的弱依赖只会设置 DEPENDS
,??
||
@@
中的弱依赖会同时设置 DEPENDS
和 RDEPENDS:${PN}
特殊依赖(环境变量)
注: 特殊依赖 Classic Build 时设置的是 #DEPS
语句的 Depend_Names
元素,Yocto Build 时赋值给配方文件的 EXTRADEPS
变量
scripts/bin/gen_depends_image.sh
命令参数
-a
指定的路径)-t
指定的路径)make 包名-deps
-u
指定的层中)初始化编译环境运行如下命令
lengjing@lengjing:~/data/cbuild$ source scripts/build.env
============================================================
ENV_BUILD_MODE : external
ENV_BUILD_JOBS : -j8
ENV_MAKE_FLAGS : -s
ENV_TOP_DIR : /home/lengjing/data/cbuild
ENV_MAKE_DIR : /home/lengjing/data/cbuild/scripts/core
ENV_TOOL_DIR : /home/lengjing/data/cbuild/scripts/bin
ENV_DOWN_DIR : /home/lengjing/data/cbuild/output/mirror-cache/downloads
ENV_CACHE_DIR : /home/lengjing/data/cbuild/output/mirror-cache/build-cache
ENV_MIRROR_URL : http://127.0.0.1:8888
ENV_TOP_OUT : /home/lengjing/data/cbuild/output/noarch
ENV_CFG_ROOT : /home/lengjing/data/cbuild/output/noarch/config
ENV_OUT_ROOT : /home/lengjing/data/cbuild/output/noarch/objects
ENV_INS_ROOT : /home/lengjing/data/cbuild/output/noarch/sysroot
ENV_DEP_ROOT : /home/lengjing/data/cbuild/output/noarch/sysroot
ENV_TOP_HOST : /home/lengjing/data/cbuild/output/x86_64-native
ENV_OUT_HOST : /home/lengjing/data/cbuild/output/x86_64-native/objects
ENV_INS_HOST : /home/lengjing/data/cbuild/output/x86_64-native/sysroot
ENV_DEP_HOST : /home/lengjing/data/cbuild/output/x86_64-native/sysroot
============================================================
还可以通过 soc 名字导出交叉编译环境
lengjing@lengjing:~/data/cbuild$ source scripts/build.env cortex-a53
============================================================
ENV_BUILD_MODE : external
ENV_BUILD_SOC : cortex-a53
ENV_BUILD_ARCH : arm64
ENV_BUILD_TOOL : /output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/bin/aarch64-linux-gnu-
ENV_BUILD_JOBS : -j8
ENV_MAKE_FLAGS : -s
KERNEL_VER : 5.15.88
KERNEL_SRC : /home/lengjing/data/cbuild/output/kernel/linux-5.15.88
KERNEL_OUT : /home/lengjing/data/cbuild/output/cortex-a53/objects/linux-5.15.88
ENV_TOP_DIR : /home/lengjing/data/cbuild
ENV_MAKE_DIR : /home/lengjing/data/cbuild/scripts/core
ENV_TOOL_DIR : /home/lengjing/data/cbuild/scripts/bin
ENV_DOWN_DIR : /home/lengjing/data/cbuild/output/mirror-cache/downloads
ENV_CACHE_DIR : /home/lengjing/data/cbuild/output/mirror-cache/build-cache
ENV_MIRROR_URL : http://127.0.0.1:8888
ENV_TOP_OUT : /home/lengjing/data/cbuild/output/cortex-a53
ENV_CFG_ROOT : /home/lengjing/data/cbuild/output/cortex-a53/config
ENV_OUT_ROOT : /home/lengjing/data/cbuild/output/cortex-a53/objects
ENV_INS_ROOT : /home/lengjing/data/cbuild/output/cortex-a53/sysroot
ENV_DEP_ROOT : /home/lengjing/data/cbuild/output/cortex-a53/sysroot
ENV_TOP_HOST : /home/lengjing/data/cbuild/output/x86_64-native
ENV_OUT_HOST : /home/lengjing/data/cbuild/output/x86_64-native/objects
ENV_INS_HOST : /home/lengjing/data/cbuild/output/x86_64-native/sysroot
ENV_DEP_HOST : /home/lengjing/data/cbuild/output/x86_64-native/sysroot
============================================================
生成交叉编译工具链
lengjing@lengjing:~/data/cbuild$ source scripts/build.env cortex-a53
lengjing@lengjing:~/data/cbuild$ make -C scripts/toolchain
注: 用户需要自己在 process_machine.sh 中填写 soc 相关的参数,目前该文件中只举例了 cortex-a53 和 cortex-a9
-s
export ENV_MAKE_FLAGS=
: 设为空时将输出详细的编译信息python -m http.server 端口号
快速创建 http 服务器注: Yocto Build 时,由于 BitBake 任务无法直接使用当前 shell 的环境变量,所以自定义环境变量应由配方文件导出,不需要 source 这个环境脚本
OUT_PATH
,设置并导出交叉编译环境或本地编译环境bitbake
设置并导出$(call safe_copy,cp选项,源和目标)
: 非 Yocto Build 时使用加文件锁的 cp,防止多个目标多进程同时安装目录时报错$(call link_hdrs)
: 根据 SEARCH_HDRS 变量的值自动生成查找头文件的 CFLAGS$(call link_libs)
: 自动生成查找库文件的 LDFLAGS$(call prepare_sysroot)
: Normal Build 时在 OUT_PATH 目录准备 sysroot-native
)-native
base_*dir
和 hdrdir
不属于 GNUInstallDirs 的标准$(INS_PREFIX)
$(eval $(call install_obj,<ID名>,<cp 选项>))
: 生成安装到指定目录的 Makefile 规则
dir
install_<小写id名>s
INSTALL_<大写ID名>S
已定义的 Makefile 规则
目录名 | 目录定义(目标文件夹) | 要安装的源文件集 | Makefile 规则的目标 |
---|---|---|---|
base_bindir |
/bin |
$(INSTALL_BASE_BINS) |
install_base_bins |
base_sbindir |
/sbin |
$(INSTALL_BASE_SBINS) |
install_base_sbins |
base_libdir |
/lib |
$(INSTALL_BASE_LIBS) |
install_base_libs |
bindir |
/usr/bin |
$(INSTALL_BINS) |
install_bins |
sbindir |
/usr/sbin |
$(INSTALL_SBINS) |
install_sbins |
libdir |
/usr/lib |
$(INSTALL_LIBS) |
install_libs |
libexecdir |
/usr/libexec |
$(INSTALL_LIBEXECS) |
install_libexecs |
hdrdir |
/usr/include/$(INSTALL_HDR) |
$(INSTALL_HDRS) |
install_hdrs |
includedir |
/usr/include |
$(INSTALL_INCLUDES) |
install_includes |
datadir |
/usr/share |
$(INSTALL_DATAS) |
install_datas |
infodir |
$(datadir)/info |
$(INSTALL_INFOS) |
install_infos |
localedir |
$(datadir)/locale |
$(INSTALL_LOCALES) |
install_locales |
mandir |
$(datadir)/man |
$(INSTALL_MANS) |
install_mans |
docdir |
$(datadir)/doc |
$(INSTALL_DOCS) |
install_docs |
sysconfdir |
/etc |
$(INSTALL_SYSCONFS) |
install_sysconfs |
servicedir |
/srv |
$(INSTALL_SERVICES) |
install_services |
sharedstatedir |
/com |
$(INSTALL_SHAREDSTATES) |
install_sharedstates |
localstatedir |
/var |
$(INSTALL_LOCALSTATES) |
install_localstates |
runstatedir |
/run |
$(INSTALL_RUNSTATES) |
install_runstates |
变量默认值定义
inc.app.mk
,编译生成的可执行文件会加入到 BIN_TARGETS
变量,INSTALL_BINARIES
已默认赋值为 $(BIN_TARGETS)
inc.app.mk
,编译生成的库文件会加入到 LIB_TARGETS
变量,INSTALL_LIBRARIES
已默认赋值为 $(LIB_TARGETS)
INSTALL_BASE_BINARIES ?= $(INSTALL_BINARIES)
INSTALL_BASE_BINS ?= $(INSTALL_BASE_BINARIES)
INSTALL_BINS ?= $(INSTALL_BINARIES)
INSTALL_BASE_LIBRARIES ?= $(INSTALL_LIBRARIES)
INSTALL_BASE_LIBS ?= $(INSTALL_BASE_LIBRARIES)
INSTALL_LIBS ?= $(INSTALL_LIBRARIES)
INSTALL_HDRS ?= $(INSTALL_HEADERS)
$(eval $(call install_ext,<ID名>,<cp 选项>))
: 生成安装到指定目录的指定子目录的 Makefile 模式规则
dir
install_<小写id名>s_%
,%
匹配小写字符INSTALL_<大写ID名>S_xxx
,xxx
和目标中的模式匹配部分的字符串相同
/
开头的指定子目录已定义的 Makefile 模式规则
install_todir_xxx
和 install_tofile_xxx
不是由 install_ext
定义的
install_todir_xxx
: 安装到根目录的指定子目录的 Makefile 模式规则install_tofile_xxx
: 安装到根目录的指定文件的 Makefile 模式规则,用于安装文件并重命名目录名 | 目标文件夹 | 设置安装的变量名 | Makefile 规则的模式目标 |
---|---|---|---|
includedir |
/usr/include<指定子目录> |
$(INSTALL_INCLUDES_<xxx>) |
install_includes_% |
datadir |
/usr/share<指定子目录> |
$(INSTALL_DATAS_<xxx>) |
install_datas_% |
sysconfdir |
/etc<指定子目录> |
$(INSTALL_SYSCONFS_<xxx>) |
install_sysconfs_% |
|
<指定子目录> |
$(INSTALL_TODIR_<xxx>) |
install_todir_% |
|
<指定子文件> |
$(INSTALL_TOFILE_<xxx>) |
install_tofile_% |
模式规则例子
创建2个空白文件 testa 和 testb,Makefile 内容如下:
INSTALL_DATAS_test = testa testb /testa/testb
INSTALL_TODIR_test = testa testb /usr/local/bin
INSTALL_TOFILE_testa = testa /etc/a.conf
INSTALL_TOFILE_testb = testa /etc/b.conf
all: install_datas_test install_todir_test install_tofile_testa install_tofile_testb
include $(ENV_MAKE_DIR)/inc.ins.mk
运行 make 安装后的文件树
sysroot
├── etc
│ ├── a.conf
│ └── b.conf
└── usr
├── local
│ └── bin
│ ├── testa
│ └── testb
└── share
└── testa
└── testb
├── testa
└── testb
LIB_TARGETS
变量库名 主版本号 次版本号 补丁版本号
格式,例如
LIBSO_NAME = libtest.so 1 2 3
编译生成动态库 libtest.so.1.2.3,并创建符号链接 libtest.so 和 libtest.so.1LIBSO_NAME = libtest.so 1 2
编译生成动态库 libtest.so.1.2 ,并创建符号链接 libtest.so 和 libtest.so.1LIBSO_NAME = libtest.so 1
编译生成动态库 libtest.so.1 ,并创建符号链接 libtest.soLIBSO_NAME = libtest.so
编译生成动态库 libtest.solibxxxx.so.x
,可以通过 LDFLAGS 覆盖默认值
LDFLAGS += -Wl,-soname=libxxxx.so
LIB_TARGETS
变量BIN_TARGETS
变量$(eval $(call add-liba-build,静态库名,源文件列表))
: 创建编译静态库规则$(eval $(call add-libso-build,动态库名,源文件列表))
: 创建编译动态库规则
库名 主版本号 次版本号 补丁版本号
格式,参考 LIBSO_NAME 的说明$(eval $(call add-libso-build,动态库名,源文件列表,链接参数))
: 创建编译动态库规则
$(eval $(call add-libso-build,动态库名,源文件列表,-Wl$(comma)-soname=libxxxx.so))
$(eval $(call add-bin-build,可执行文件名,源文件列表))
: 创建编译可执行文件规则$(eval $(call add-bin-build,可执行文件名,源文件列表,链接参数))
: 创建编译可执行文件规则$(call set_flags,标记名称,源文件列表,标记值)
: 单独为指定源码集合设置编译标记
$(call set_flags,CFLAGS,main.c src/read.c src/write.c,-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
注: 提供上述函数的原因是可以在一个 Makefile 中编译出多个库或可执行文件
.
)是包的根目录,也有的包将源码放在 src 下
SRC_PATH = src1 src2 src3
.git scripts output
文件夹c cpp S
为后缀的源码文件
cc cp cxx cpp CPP c++ C
S s asm
REG_SUFFIX = c cpp S cxx
include $(ENV_MAKE_DIR)/inc.app.mk
REG_SUFFIX = c cpp S CXX
CPP_SUFFIX = cc cp cxx cpp CPP c++ C CXX
include $(ENV_MAKE_DIR)/inc.app.mk
$(eval $(call compile_obj,CXX,$$(CXX)))
*.c
文件也用 CXX 编译*.c *.cpp *.S
文件
gcc g++
命令)as
命令)xxx.c / xxx.cpp / ... / xxx.S
设置编译标记xxx.s / xxx.asm
设置编译标记-O0 -g -ggdb
编译$(ENV_TOP_DIR)/scripts/kconfig
,和实际一致即可srctree=path_name
: Kconfig 文件中 source 其它配置参数文件的相对的目录是 srctree 指定的目录,如果不指定,默认是运行 conf/mconf
命令的目录CONFIG_=""
: 设置生成的 .config 和 config.h 文件中的选项名称(对比 Kconfig 对应的选项名称)的前缀,不设置时,默认值是 CONFIG_
,本例的设置是无前缀__大写包名_CONFIG_H__
#ifndef xxx ... #define xxx ... #endif
,本模板使用 sed 命令添加了宏注: 目录下的 Kconfig 文件也说明了如何写配置参数
scripts/kconfig
CONFIG_PATH
AUTOCONFIG_PATH
AUTOHEADER_PATH
,原先这些参数要作为环境变量传入$(INS_PREFIX)/lib/modules/<kernel_release>/extra/
install_hdrs
目标的依赖)make -O $(KERNEL_OUT)
编译内核的情况下必须).git scripts output
文件夹*.c *.S
文件ccflags-y
asflags-y
ldflags-y
: 分别对应内核模块编译、汇编、链接时的参数$(call translate_obj,源码文件集)
: 将源码文件集名字转换为KBUILD需要的 *.o
格式,不管源码是不是以 $(src)/
开头$(call set_flags,标记名称,源文件列表,标记值)
: 单独为指定源码集设置编译标记,参考 inc.app.mk 的说明如果 MOD_NAME 含有多个模块名称,需要用户自己填写各个模块下的对象,例如
MOD_NAME = mod1 mod2
mod1-y = a1.o b1.o c1.o
mod2-y = a2.o b2.o c2.o
使用源码和编译输出分离时, 需要先将 Kbuild 或 Makefile 复制到 OUT_PATH 目录下,如果不想复制,需要修改内核源码的 scripts/Makefile.modpost
,linux-5.19 内核和最新版本的 LTS 内核已合并此补丁
-include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
- $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
+include $(if $(wildcard $(src)/Kbuild), $(src)/Kbuild, $(src)/Makefile)
fetch_package.sh <method> <urls> <package> [outdir] [outname]
tar
命令解压的包,使用 curl
下载包,后缀名为 tar.gz
tar.bz2
tar.xz
tar
等unzip
命令解压的包,使用 curl
下载包,后缀名为 gz
zip
等git clone
下载包svn checkout
下载包https://xxx/xxx.tar.xz;md5=yyy
https://xxx/xxx.gz;md5=yyy
https://xxx/xxx.git;branch=xxx;tag=yyy
https://xxx/xxx.git;branch=xxx;rev=yyy
https://xxx/xxx.git;tag=yyy
https://xxx/xxx.git;rev=yyy
https://xxx/xxx;rev=yyy
ENV_DOWN_DIR
ENV_MIRROR_URL
指定的镜像 URL 下载包,下载失败时才从原始的 URL 下载exec_patch.sh <method> <patch_srcs> <patch_dst>
例子: 选择是否打补丁的方法
源码包名-patch-补丁ID名
和 源码包名-unpatch-补丁ID名
#DEPS
语句的 Depend_Names 加上 xxx-patch-xxx|xxx-unpatch-xxx
#VDEPS(choice) xxx-patch-xxx-choice(xxx-unpatch-xxx xxx-patch-xxx):
PATCH_SCRIPT := $(ENV_TOOL_DIR)/exec_patch.sh
PATCH_PACKAGE := xxx
PATCH_TOPATH := xxx
PATCH_FOLDER := xxx
PATCH_NAME_xxx := 0001-xxx.patch
PATCH_NAME_yyy := 0001-yyy.patch 0002-yyy.patch
$(PATCH_PACKAGE)-unpatch-all:
@$(PATCH_SCRIPT) unpatch $(PATCH_FOLDER) $(PATCH_TOPATH)
@echo "Unpatch $(PATCH_TOPATH) Done."
$(PATCH_PACKAGE)-patch-%-all:
@$(PATCH_SCRIPT) patch "$(patsubst %,$(PATCH_FOLDER)/%,$(PATCH_NAME_$(patsubst $(PATCH_PACKAGE)-patch-%-all,%,$@)))" $(PATCH_TOPATH)
@echo "Build $(patsubst %-all,%,$@) Done."
$(PATCH_PACKAGE)-unpatch-%-all:
@$(PATCH_SCRIPT) unpatch "$(patsubst %,$(PATCH_FOLDER)/%,$(PATCH_NAME_$(patsubst $(PATCH_PACKAGE)-unpatch-%-all,%,$@)))" $(PATCH_TOPATH)
@echo "Build $(patsubst %-all,%,$@) Done."
%-clean:
@
%-install:
@
process_cache.sh -h
查看命令帮助tar zip git svn
,默认值为 tar$(OUT_PATH)/$(SRC_DIR)
设置的值$(OUT_PATH)/build
设置的值$(OUT_PATH)/image
设置的值/usr
,则真正的安装目录为 $(INS_PATH)$(INS_SUBDIR)
make $(ENV_BUILD_JOBS) $(ENV_MAKE_FLAGS) $(MAKES_FLAGS)
,用户可以设置额外的参数 MAKES_FLAGS
ninja $(ENV_BUILD_JOBS) $(MAKES_FLAGS)
,用户可以设置额外的参数 MAKES_FLAGS
$(SRC_NAME)
设置的值
$(OUT_PATH)
设置的值$(INS_PATH)
设置的值soc_name
cpu_name
arch_name
cpu_family
v9 cortex-a55 armv8-a aarch64
搜索的目录路径:搜索的字符串:忽略的文件夹名:忽略的字符串
,其中子项目可以使用竖线 |
隔开
"srca|srcb:*.c|*.h|Makefile:test:*.o|*.d"
, "src:*.c|*.h|*.cpp|*.hpp"
none
${ENV_CFG_ROOT}
中的 DEPS 和 .config 文件获取依赖[$(FETCH_METHOD)]$(SRC_URLS)
设置的值
[download_method]urls
,例如 [tar]urls
[zip]urls
[git]urls
[svn]urls
$(CACHE_OUTPATH)/$(CACHE_PACKAGE)-cache.log
PATCH_FOLDER
CONFIGURE_FLAGS
变量提供额外的命令参数
CMAKE_FLAGS
变量提供额外的命令参数
MESON_FLAGS
变量提供额外的命令参数
--wrap-mode=nodownload
表示禁止 meson 下载依赖包编译--libdir=$(INS_PATH)$(INS_SUBDIR)/lib
,表示设置安装库文件路径,不然本地编译时会安装到 lib 下的 x86_64-linux-gnuUSER_DEFINED_TARGET
为 y,采用模板默认提供的 all clean install
目标注: 我们从源码编译 OSS 包时,一般会在 DEPS 语句的其它目标加上 cache psysroot,表示使用缓存机制加快再次编译和在 OUT_PATH 准备 sysroot 防止 OSS 自动加上未声明的依赖包导致编译出错
OSS 层的包不断增加中,目前已有50多个包
编译缓存演示 demo cache_demo
编译命令
make time_statistics
是一个一个包编译过去(包内可能是多线程编译),获取每个包的编译时间
make
是不仅是包内可能是多线程编译,多个包也是同时编译,不统计编译时间make all_fetchs
只下载所有选中的支持缓存的包的源码
*
注: 第一次编译前最好选中支持缓存的包后下载所有的源码 make all_fetchs
,防止源码无法一次下载成功导致其它问题make all_caches
下载并编译所有选中的支持缓存的包的源码编译交叉编译工具链,举例 cortex-a53
lengjing@lengjing:~/data/cbuild$ source scripts/build.env cortex-a53
...
lengjing@lengjing:~/data/cbuild$ make -C scripts/toolchain
make: Entering directory '/home/lengjing/data/cbuild/scripts/toolchain'
make[1]: Entering directory '/home/lengjing/data/cbuild/scripts/toolchain'
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz" gmp-6.2.1.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs gmp-6.2.1
curl http://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/gmp-6.2.1.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/gmp-6.2.1.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://ftp.gnu.org/gnu/mpfr/mpfr-4.1.1.tar.xz" mpfr-4.1.1.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs mpfr-4.1.1
curl http://ftp.gnu.org/gnu/mpfr/mpfr-4.1.1.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/mpfr-4.1.1.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/mpfr-4.1.1.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz" mpc-1.3.1.tar.gz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs mpc-1.3.1
curl http://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/mpc-1.3.1.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/mpc-1.3.1.tar.gz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
/home/lengjing/data/cbuild/scripts/bin/exec_patch.sh patch patch/mpc /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs/mpc-1.3.1
patching file src/mpc.h
Patch patch/mpc/0001-mpc-Fix-configuring-gcc-failed.patch to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs/mpc-1.3.1 Done.
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://libisl.sourceforge.io/isl-0.25.tar.xz" isl-0.25.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs isl-0.25
curl http://libisl.sourceforge.io/isl-0.25.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/isl-0.25.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/isl-0.25.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.88.tar.xz" linux-5.15.88.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs linux-5.15.88
curl http://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.88.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/linux-5.15.88.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/linux-5.15.88.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.xz" binutils-2.40.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs binutils-2.40
curl http://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/binutils-2.40.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/binutils-2.40.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz" gcc-12.2.0.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs gcc-12.2.0
curl http://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/gcc-12.2.0.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/gcc-12.2.0.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
sed -i 's@print-multi-os-directory@print-multi-directory@g' \
`find /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs/gcc-12.2.0 -name configure -o -name configure.ac -o -name Makefile.in | xargs`
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://ftp.gnu.org/gnu/glibc/glibc-2.36.tar.xz" glibc-2.36.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs glibc-2.36
curl http://ftp.gnu.org/gnu/glibc/glibc-2.36.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/glibc-2.36.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/glibc-2.36.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
/home/lengjing/data/cbuild/scripts/bin/fetch_package.sh tar "http://ftp.gnu.org/gnu/gdb/gdb-12.1.tar.xz" gdb-12.1.tar.xz /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs gdb-12.1
curl http://ftp.gnu.org/gnu/gdb/gdb-12.1.tar.xz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/gdb-12.1.tar.xz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/gdb-12.1.tar.xz to /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs
./output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/bin/aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=./output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/bin/aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/libexec/gcc/aarch64-linux-gnu/12.2.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/lengjing/data/cbuild/output/x86_64-native/objects/scripts/toolchain/srcs/gcc-12.2.0/configure --target=aarch64-linux-gnu --prefix=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15 --with-gmp=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/host --with-mpfr=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/host --with-mpc=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/host --with-isl=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/host --with-sysroot=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/aarch64-linux-gnu/libc --with-build-sysroot=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/aarch64-linux-gnu/libc --with-toolexeclibdir=/home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/aarch64-linux-gnu/libc/lib --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-checking=release --with-arch=armv8-a --with-cpu=cortex-a53 --disable-bootstrap --disable-multilib --enable-multiarch --enable-nls --without-included-gettext --enable-clocale=gnu --enable-lto --enable-linker-build-id --enable-gnu-unique-object --enable-libstdcxx-debug --enable-libstdcxx-time=yes
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (GCC)
lengjing@lengjing:~/data/cbuild$ ls output/mirror-cache/build-cache/
x86_64--cortex-a53-toolchain-gcc12.2.0-linux5.15-native--8ec20b3593ccaf0a87712ade12d00de6.tar.gz
清理下载后,统计各个包的编译时间,只选中如下几个具有代表性的包测试
lengjing@lengjing:~/data/cbuild$ rm -rf output/cortex-a53 output/mirror-cache/downloads
...
lengjing@lengjing:~/data/cbuild$ make test_config
...
lengjing@lengjing:~/data/cbuild$ make time_statistics
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/Kconfig OK.
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/auto.mk OK.
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/DEPS OK.
curl http://www.busybox.net/downloads/busybox-1.35.0.tar.bz2 to /home/lengjing/data/cbuild/output/mirror-cache/downloads/busybox-1.35.0.tar.bz2
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/busybox-1.35.0.tar.bz2 to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox
/home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox/busybox-1.35.0/applets/usage.c: In function 'main':
/home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox/busybox-1.35.0/applets/usage.c:52:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
...
Push busybox Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build busybox Done.
Install busybox Done.
curl http://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.15.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/cJSON-1.7.15.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/cJSON-1.7.15.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/cjson
Push cjson Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build cjson Done.
Install cjson Done.
curl http://www.tcpdump.org/release/libpcap-1.10.1.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/libpcap-1.10.1.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/libpcap-1.10.1.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/libpcap
Push libpcap Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build libpcap Done.
Install libpcap Done.
git clone https://github.com/lengjingzju/json.git to /home/lengjing/data/cbuild/output/mirror-cache/downloads/ljson
Cloning into '/home/lengjing/data/cbuild/output/mirror-cache/downloads/ljson'...
remote: Enumerating objects: 39, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 39 (delta 1), reused 0 (delta 0), pack-reused 37
Unpacking objects: 100% (39/39), done.
copy /home/lengjing/data/cbuild/output/mirror-cache/downloads/ljson to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/ljson
Push ljson Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ljson Done.
Install ljson Done.
curl http://www.lua.org/ftp/lua-5.4.4.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/lua-5.4.4.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/lua-5.4.4.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/lua
patching file Makefile
patching file src/Makefile
Patch /home/lengjing/data/cbuild/oss/lua/patch/0001-lua-Support-dynamic-library-compilation.patch to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/lua/lua-5.4.4 Done.
patching file src/lparser.c
Patch /home/lengjing/data/cbuild/oss/lua/patch/CVE-2022-28805.patch to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/lua/lua-5.4.4 Done.
Push lua Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build lua Done.
Install lua Done.
curl http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.3.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/ncurses-6.3.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/ncurses-6.3.tar.gz to /home/lengjing/data/cbuild/output/x86_64-native/objects/oss/ncurses
configure: WARNING: This option applies only to wide-character library
...
Push ncurses-native Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ncurses-native Done.
Install ncurses-native Done.
Install ncurses-native Done.
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/ncurses-6.3.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/ncurses
configure: WARNING: If you wanted to set the --build type, don't use --host.
...
Push ncurses Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ncurses Done.
Install ncurses Done.
Install libpcap Done.
curl http://www.tcpdump.org/release/tcpdump-4.99.1.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/tcpdump-4.99.1.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/tcpdump-4.99.1.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/tcpdump
configure: WARNING: using cross tools not prefixed with host triplet
configure: WARNING: pcap/pcap-inttypes.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: pcap/pcap-inttypes.h: proceeding with the compiler's result
Push tcpdump Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build tcpdump Done.
Install tcpdump Done.
Build rootfs Done.
Install packages from /home/lengjing/data/cbuild/output/cortex-a53/sysroot
Install busybox Done.
Install Glibc target from /home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/aarch64-linux-gnu/libc
Build done!
lengjing@lengjing:~/data/cbuild$ cat output/cortex-a53/config/time_statistics
real user sys package
0.04 0.04 0.00 deps
0.04 0.04 0.01 busybox
23.77 77.62 16.90 busybox
0.01 0.00 0.00 busybox
0.06 0.05 0.01 cjson
4.92 1.71 0.47 cjson
0.00 0.00 0.00 cjson
0.05 0.04 0.01 libpcap
14.59 8.47 1.15 libpcap
0.01 0.00 0.00 libpcap
0.05 0.05 0.00 ljson
4.23 1.16 0.09 ljson
0.00 0.00 0.00 ljson
0.06 0.05 0.00 lua
7.93 6.59 0.41 lua
0.00 0.00 0.00 lua
0.06 0.05 0.01 ncurses-native
30.24 65.82 12.07 ncurses-native
0.08 0.01 0.06 ncurses-native
0.08 0.00 0.07 ncurses-native_install
0.17 0.08 0.09 ncurses
31.85 107.68 18.63 ncurses
0.08 0.01 0.06 ncurses
0.01 0.00 0.00 libpcap_install
0.07 0.06 0.01 tcpdump
13.14 10.84 3.02 tcpdump
0.01 0.00 0.00 tcpdump
0.00 0.00 0.00 rootfs
1.17 0.53 0.44 rootfs
132.74 281.01 53.54 total_time
再次编译,直接从本地缓存取了,没有重新从代码编译
lengjing@lengjing:~/data/cbuild$ make -C scripts/toolchain
make: Entering directory '/home/lengjing/data/cbuild/scripts/toolchain'
Use cortex-a53-toolchain-gcc12.2.0-linux5.15 Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build cortex-a53-toolchain-gcc12.2.0-linux5.15 Done.
make: Leaving directory '/home/lengjing/data/cbuild/scripts/toolchain'
lengjing@lengjing:~/data/cbuild$ make time_statistics
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/Kconfig OK.
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/auto.mk OK.
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/DEPS OK.
Use busybox Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build busybox Done.
Install busybox Done.
Use cjson Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build cjson Done.
Install cjson Done.
Use libpcap Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build libpcap Done.
Install libpcap Done.
Use ljson Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ljson Done.
Install ljson Done.
Use lua Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build lua Done.
Install lua Done.
Use ncurses-native Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ncurses-native Done.
Install ncurses-native Done.
Use ncurses Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ncurses Done.
Install ncurses Done.
Use tcpdump Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build tcpdump Done.
Install tcpdump Done.
Build rootfs Done.
Install packages from /home/lengjing/data/cbuild/output/cortex-a53/sysroot
Install busybox Done.
Install Glibc target from /home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/aarch64-linux-gnu/libc
Build done!
lengjing@lengjing:~/data/cbuild$
lengjing@lengjing:~/data/cbuild$ cat output/cortex-a53/config/time_statistics
real user sys package
0.04 0.03 0.00 deps
0.04 0.04 0.00 busybox
0.09 0.08 0.02 busybox
0.01 0.00 0.00 busybox
0.05 0.05 0.00 cjson
0.08 0.07 0.01 cjson
0.00 0.00 0.00 cjson
0.04 0.04 0.01 libpcap
0.08 0.07 0.01 libpcap
0.03 0.00 0.01 libpcap
0.04 0.04 0.00 ljson
0.08 0.07 0.01 ljson
0.00 0.00 0.00 ljson
0.05 0.05 0.00 lua
0.08 0.08 0.01 lua
0.00 0.00 0.00 lua
0.05 0.04 0.01 ncurses-native
0.08 0.08 0.01 ncurses-native
0.28 0.01 0.19 ncurses-native
0.06 0.05 0.01 ncurses
0.09 0.09 0.01 ncurses
0.25 0.01 0.18 ncurses
0.05 0.04 0.01 tcpdump
0.09 0.08 0.01 tcpdump
0.00 0.00 0.00 tcpdump
0.03 0.00 0.02 rootfs
1.14 0.53 0.44 rootfs
2.96 1.66 1.09 total_time
另启一个终端,启动镜像服务器
lengjing@lengjing:~/data/cbuild$ cd output
lengjing@lengjing:~/data/cbuild/output$ mv mirror-cache mirror
lengjing@lengjing:~/data/cbuild/output$ cd mirror
lengjing@lengjing:~/data/cbuild/output/mirror$ rm -rf downloads/lock
lengjing@lengjing:~/data/cbuild/output/mirror$ tree
.
├── build-cache
│ ├── cortex-a53--busybox--b7c40d7a733221bbd8327e487cfee505.tar.gz
│ ├── cortex-a53--cjson--8167d8f3fd82197b44bb7498b4d97bb0.tar.gz
│ ├── cortex-a53--libpcap--5db3b7c187d08870a29ee48f725e96bc.tar.gz
│ ├── cortex-a53--ljson--1cb819ebcb847f1feff24879246c30d5.tar.gz
│ ├── cortex-a53--lua--370ffcee1a70bc93516df21de9de0634.tar.gz
│ ├── cortex-a53--ncurses--96424c436be9e0bc02bcdaea10083a8f.tar.gz
│ ├── cortex-a53--tcpdump--5652e8bf037a2ee5792fcbf02adee2b7.tar.gz
│ ├── x86_64--cortex-a53-toolchain-gcc12.2.0-linux5.15-native--8ec20b3593ccaf0a87712ade12d00de6.tar.gz
│ └── x86_64--ncurses-native--54a6ab0af25ad68f24bff08355b59efb.tar.gz
└── downloads
├── busybox-1.35.0.tar.bz2
├── busybox-1.35.0.tar.bz2.src.hash
├── cJSON-1.7.15.tar.gz
├── cJSON-1.7.15.tar.gz.src.hash
├── libpcap-1.10.1.tar.gz
├── libpcap-1.10.1.tar.gz.src.hash
├── ljson
│ ├── json.c
│ ├── json.h
│ ├── json_test.c
│ ├── json_test.png
│ ├── LICENSE
│ └── README.md
├── ljson-git-br.-rev.7b2f6ae6cf7011e94682b073669f5ff8f69095cc.tar.gz
├── ljson.src.hash
├── lua-5.4.4.tar.gz
├── lua-5.4.4.tar.gz.src.hash
├── ncurses-6.3.tar.gz
├── ncurses-6.3.tar.gz.src.hash
├── tcpdump-4.99.1.tar.gz
└── tcpdump-4.99.1.tar.gz.src.hash
3 directories, 29 files
lengjing@lengjing:~/data/cbuild/output/mirror$ python3 -m http.server 8888
Serving HTTP on 0.0.0.0 port 8888 (http://0.0.0.0:8888/) ...
原终端删除所有编译输出和缓存,开始全新编译,直接从网络缓存取了,没有重新从代码编译
lengjing@lengjing:~/data/cbuild$ rm -rf output/cortex-a53 output/mirror-cache output/toolchain
lengjing@lengjing:~/data/cbuild$ make test_config
...
lengjing@lengjing:~/data/cbuild$ make -C scripts/toolchain
make: Entering directory '/home/lengjing/data/cbuild/scripts/toolchain'
curl http://127.0.0.1:8888/build-cache/x86_64--cortex-a53-toolchain-gcc12.2.0-linux5.15-native--8ec20b3593ccaf0a87712ade12d00de6.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/x86_64--cortex-a53-toolchain-gcc12.2.0-linux5.15-native--8ec20b3593ccaf0a87712ade12d00de6.tar.gz
Use cortex-a53-toolchain-gcc12.2.0-linux5.15 Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build cortex-a53-toolchain-gcc12.2.0-linux5.15 Done.
make: Leaving directory '/home/lengjing/data/cbuild/scripts/toolchain'
lengjing@lengjing:~/data/cbuild$ make time_statistics
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/Kconfig OK.
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/auto.mk OK.
Generate /home/lengjing/data/cbuild/output/cortex-a53/config/DEPS OK.
curl http://127.0.0.1:8888/build-cache/cortex-a53--busybox--b7c40d7a733221bbd8327e487cfee505.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--busybox--b7c40d7a733221bbd8327e487cfee505.tar.gz
Use busybox Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build busybox Done.
Install busybox Done.
curl http://127.0.0.1:8888/build-cache/cortex-a53--cjson--8167d8f3fd82197b44bb7498b4d97bb0.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--cjson--8167d8f3fd82197b44bb7498b4d97bb0.tar.gz
Use cjson Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build cjson Done.
Install cjson Done.
curl http://127.0.0.1:8888/build-cache/cortex-a53--libpcap--5db3b7c187d08870a29ee48f725e96bc.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--libpcap--5db3b7c187d08870a29ee48f725e96bc.tar.gz
Use libpcap Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build libpcap Done.
Install libpcap Done.
curl http://127.0.0.1:8888/build-cache/cortex-a53--ljson--1cb819ebcb847f1feff24879246c30d5.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--ljson--1cb819ebcb847f1feff24879246c30d5.tar.gz
Use ljson Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ljson Done.
Install ljson Done.
curl http://127.0.0.1:8888/build-cache/cortex-a53--lua--370ffcee1a70bc93516df21de9de0634.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--lua--370ffcee1a70bc93516df21de9de0634.tar.gz
Use lua Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build lua Done.
Install lua Done.
curl http://127.0.0.1:8888/build-cache/x86_64--ncurses-native--54a6ab0af25ad68f24bff08355b59efb.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/x86_64--ncurses-native--54a6ab0af25ad68f24bff08355b59efb.tar.gz
Use ncurses-native Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ncurses-native Done.
Install ncurses-native Done.
curl http://127.0.0.1:8888/build-cache/cortex-a53--ncurses--96424c436be9e0bc02bcdaea10083a8f.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--ncurses--96424c436be9e0bc02bcdaea10083a8f.tar.gz
Use ncurses Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ncurses Done.
Install ncurses Done.
curl http://127.0.0.1:8888/build-cache/tcpdump--5652e8bf037a2ee5792fcbf02adee2b7.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/tcpdump--5652e8bf037a2ee5792fcbf02adee2b7.tar.gz
Use tcpdump Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build tcpdump Done.
Install tcpdump Done.
Build rootfs Done.
Install packages from /home/lengjing/data/cbuild/output/cortex-a53/sysroot
Install busybox Done.
Install Glibc target from /home/lengjing/data/cbuild/output/toolchain/cortex-a53-toolchain-gcc12.2.0-linux5.15/aarch64-linux-gnu/libc
Build done!
lengjing@lengjing:~/data/cbuild$ cat output/cortex-a53/config/time_statistics
real user sys package
0.04 0.03 0.00 deps
0.06 0.05 0.01 busybox
0.12 0.10 0.02 busybox
0.01 0.00 0.00 busybox
0.07 0.06 0.00 cjson
0.08 0.07 0.02 cjson
0.00 0.00 0.00 cjson
0.07 0.06 0.01 libpcap
0.12 0.09 0.03 libpcap
0.01 0.00 0.00 libpcap
0.06 0.05 0.01 ljson
0.11 0.09 0.04 ljson
0.00 0.00 0.00 ljson
0.07 0.06 0.00 lua
0.10 0.10 0.01 lua
0.01 0.01 0.00 lua
0.08 0.05 0.03 ncurses-native
0.21 0.15 0.10 ncurses-native
0.08 0.01 0.07 ncurses-native
0.09 0.08 0.01 ncurses
0.21 0.17 0.07 ncurses
0.09 0.01 0.07 ncurses
0.08 0.06 0.02 tcpdump
0.11 0.11 0.01 tcpdump
0.00 0.00 0.00 tcpdump
0.00 0.00 0.00 rootfs
1.00 0.54 0.45 rootfs
3.00 2.07 1.10 total_time
设置强制编译,总是从代码编译
lengjing@lengjing:~/data/cbuild$ make lua_setforce
Set lua Force Build.
lengjing@lengjing:~/data/cbuild$ make lua
WARNING: Force Build lua.
curl http://127.0.0.1:8888/downloads/lua-5.4.4.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/lua-5.4.4.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/lua-5.4.4.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/lua
patching file Makefile
patching file src/Makefile
Patch /home/lengjing/data/cbuild/oss/lua/patch/0001-lua-Support-dynamic-library-compilation.patch to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/lua/lua-5.4.4 Done.
patching file src/lparser.c
Patch /home/lengjing/data/cbuild/oss/lua/patch/CVE-2022-28805.patch to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/lua/lua-5.4.4 Done.
Push lua Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build lua Done.
Install lua Done.
lengjing@lengjing:~/data/cbuild$ make lua
WARNING: Force Build lua.
Push lua Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build lua Done.
Install lua Done.
取消强制编译,再次编译直接从缓存取了,没有重新从代码编译(没有网络缓存时需要重新从代码编译一次)
lengjing@lengjing:~/data/cbuild$ make lua_unsetforce
Unset lua Force Build.
lengjing@lengjing:~/data/cbuild$ make lua
curl http://127.0.0.1:8888/build-cache/cortex-a53--lua--370ffcee1a70bc93516df21de9de0634.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--lua--370ffcee1a70bc93516df21de9de0634.tar.gz
Use lua Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build lua Done.
Install lua Done.
lengjing@lengjing:~/data/cbuild$ make lua
Use lua Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build lua Done.
Install lua Done.
修改加入到校验的文件,从代码编译了一次
lengjing@lengjing:~/data/cbuild$ echo >> oss/ljson/patch/Makefile
lengjing@lengjing:~/data/cbuild$ make ljson
curl http://127.0.0.1:8888/downloads/ljson-git-br.-rev.7b2f6ae6cf7011e94682b073669f5ff8f69095cc.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/ljson-git-br.-rev.7b2f6ae6cf7011e94682b073669f5ff8f69095cc.tar.gz
copy /home/lengjing/data/cbuild/output/mirror-cache/downloads/ljson to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/ljson
Push ljson Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ljson Done.
Install ljson Done.
lengjing@lengjing:~/data/cbuild$ make ljson
Use ljson Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build ljson Done.
Install ljson Done.
修改代码的 config,设置了强制编译,总是从代码编译
lengjing@lengjing:~/data/cbuild$ make busybox_menuconfig
curl http://127.0.0.1:8888/downloads/busybox-1.35.0.tar.bz2 to /home/lengjing/data/cbuild/output/mirror-cache/downloads/busybox-1.35.0.tar.bz2
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/busybox-1.35.0.tar.bz2 to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox
GEN /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox/build/Makefile
#
# using defaults found in .config
#
*** End of configuration.
*** Execute 'make' to build the project or try 'make help'.
Set busybox Force Build.
lengjing@lengjing:~/data/cbuild$ make busybox
WARNING: Force Build busybox.
/home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox/busybox-1.35.0/applets/usage.c: In function 'main':
/home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox/busybox-1.35.0/applets/usage.c:52:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
...
Push busybox Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build busybox Done.
Install busybox Done.
lengjing@lengjing:~/data/cbuild$ make busybox
WARNING: Force Build busybox.
Push busybox Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build busybox Done.
Install busybox Done.
还原代码的默认 config,取消设置了强制编译,直接从缓存取了,没有重新从代码编译
lengjing@lengjing:~/data/cbuild$ make busybox_defconfig
GEN /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/busybox/build/Makefile
*
* Busybox Configuration
*
*
* Settings
*
...
Unset busybox Force Build.
lengjing@lengjing:~/data/cbuild$ make busybox
curl http://127.0.0.1:8888/build-cache/cortex-a53--busybox--b7c40d7a733221bbd8327e487cfee505.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/build-cache/cortex-a53--busybox--b7c40d7a733221bbd8327e487cfee505.tar.gz
Use busybox Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build busybox Done.
Install busybox Done.
lengjing@lengjing:~/data/cbuild$ make busybox
Use busybox Cache in /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build busybox Done.
Install busybox Done.
修改依赖包的加入到校验的文件,依赖包和依赖它的包都重新编译了
lengjing@lengjing:~/data/cbuild$ echo >> oss/libpcap/mk.deps
lengjing@lengjing:~/data/cbuild$ make tcpdump
curl http://127.0.0.1:8888/downloads/libpcap-1.10.1.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/libpcap-1.10.1.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/libpcap-1.10.1.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/libpcap
Push libpcap Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build libpcap Done.
Install libpcap Done.
Install libpcap Done.
curl http://127.0.0.1:8888/downloads/tcpdump-4.99.1.tar.gz to /home/lengjing/data/cbuild/output/mirror-cache/downloads/tcpdump-4.99.1.tar.gz
untar /home/lengjing/data/cbuild/output/mirror-cache/downloads/tcpdump-4.99.1.tar.gz to /home/lengjing/data/cbuild/output/cortex-a53/objects/oss/tcpdump
configure: WARNING: using cross tools not prefixed with host triplet
configure: WARNING: pcap/pcap-inttypes.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: pcap/pcap-inttypes.h: proceeding with the compiler's result
Push tcpdump Cache to /home/lengjing/data/cbuild/output/mirror-cache/build-cache.
Build tcpdump Done.
Install tcpdump Done.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型