conf/distro/deby.conf
require conf/distro/poky.conf
require deby.inc
DISTRO = "deby"
DISTRO poky预定义
deby.inc
DISTRO_NAME = "Deby"
DISTRO_VERSION = "10.0"
DISTRO_CODENAME = "buster"
SDK_VENDOR = "-debysdk"
SDK_VERSION := "${DISTRO_VERSION}"
MAINTAINER = "meta-debian Development Team"
TARGET_VENDOR = "-deby"
# Add an eventhandler that generates DEBIAN_SRC_URI information
# from Debian apt repository.
INHERIT += "debian-source"
# currently only Debian 10 buster is tested
# In Debian, tested distro names given by distro_identifier()
# depend on the following command and files:
# 1. lsb_release -ir => Debian-testing
# 2. /etc/lsb-release => (no package provide this file)
# 3. /etc/os-release => debian
SANITY_TESTED_DISTROS ?= " \
Debian-testing \n \
debian \n \
"
# use toolchain mode for Debian instead of the default
TCMODE ?= "deby"
# preferred providers and versions
require conf/distro/include/debian-preferred-provider.inc
# WORKAROUND for https://bugzilla.yoctoproject.org/show_bug.cgi?id=13338
TOOLCHAIN_TARGET_TASK_remove = "target-sdk-provides-dummy"
ROOT_HOME = "/root"
DISTRO_NAME poky预定义
DISTRO_VERSION poky预定义
DISTRO_CODENAME poky预定义
SDK_VENDOR poky预定义
SDK_VERSION poky预定义
MAINTAINER poky预定义
TARGET_VENDOR poky预定义
SANITY_TESTED_DISTROS poky预定义
TCMODE poky预定义 这个参数影响 toolchain, 需关注
TOOLCHAIN_TARGET_TASK_remove poky预定义 这个参数影响 toolchain, 需关注
ROOT_HOME poky预定义
TOOLCHAIN相关信息 :
cross-development-toolchain-generation
building-an-sdk-installer
conf/distro/include/debian-preferred-provider.inc
1 # use simple kernel recipes instead of linux-yocto
2 VIRTUAL_KERNEL ??= "linux-base"
3 PREFERRED_PROVIDER_virtual/kernel = "${VIRTUAL_KERNEL}"
4 PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers-base"
5 PREFERRED_PROVIDER_nativesdk-linux-libc-headers = "nativesdk-linux-libc-headers-base"
6 PREFERRED_PROVIDER_virtual/crypt = "glibc"
7 PREFERRED_PROVIDER_virtual/nativesdk-crypt = "nativesdk-glibc"
PREFERRED_PROVIDER poky预定义
这个头文件指令了 内核、头文件、glibc的选择
小结
toolchain 内核 glibc这几部分,可以暂时先不考虑;可以沿用poky的设置。
conf/distro/poky.conf
1 DISTRO = "poky"
2 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
3 DISTRO_VERSION = "2.7.4"
4 DISTRO_CODENAME = "warrior"
5 SDK_VENDOR = "-pokysdk"
6 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
7
8 MAINTAINER = "Poky <poky@yoctoproject.org>"
9
10 TARGET_VENDOR = "-poky"
11
12 LOCALCONF_VERSION = "1"
13
14 DISTRO_VERSION[vardepsexclude] = "DATE"
15 SDK_VERSION[vardepsexclude] = "DATE"
16
17 # Override these in poky based distros
18 POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland vulkan"
19 POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
20 POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
21
22 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
23
24 PREFERRED_VERSION_linux-yocto ?= "5.0%"
25
26 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
27 SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
28
29 DISTRO_EXTRA_RDEPENDS += " ${POKY_DEFAULT_EXTRA_RDEPENDS}"
30 DISTRO_EXTRA_RRECOMMENDS += " ${POKY_DEFAULT_EXTRA_RRECOMMENDS}"
31
32 POKYQEMUDEPS = "${@bb.utils.contains("INCOMPATIBLE_LICENSE", "GPL-3.0", "", "packagegroup-core-device-devel",d)}"
33 DISTRO_EXTRA_RDEPENDS_append_qemuarm = " ${POKYQEMUDEPS}"
34 DISTRO_EXTRA_RDEPENDS_append_qemuarm64 = " ${POKYQEMUDEPS}"
35 DISTRO_EXTRA_RDEPENDS_append_qemumips = " ${POKYQEMUDEPS}"
36 DISTRO_EXTRA_RDEPENDS_append_qemuppc = " ${POKYQEMUDEPS}"
37 DISTRO_EXTRA_RDEPENDS_append_qemux86 = " ${POKYQEMUDEPS}"
38 DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}"
39
40 TCLIBCAPPEND = ""
41
42 PREMIRRORS ??= "\
43 bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
44 cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
45 git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
46 gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
47 hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
48 osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
49 p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
50 svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
51
52 SANITY_TESTED_DISTROS ?= " \
53 ¦ ¦ poky-2.6 \n \
54 ¦ ¦ poky-2.7 \n \
55 ¦ ¦ ubuntu-16.04 \n \
56 ¦ ¦ ubuntu-18.04 \n \
57 ¦ ¦ fedora-28 \n \
58 ¦ ¦ fedora-29 \n \
59 ¦ ¦ fedora-30 \n \
60 ¦ ¦ centos-7 \n \
61 ¦ ¦ debian-8 \n \
62 ¦ ¦ debian-9 \n \
63 ¦ ¦ debian-10 \n \
64 ¦ ¦ opensuse-42.3 \n \
65 ¦ ¦ opensuseleap-15.1 \n \
66 ¦ ¦ "
67 #
68 # OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
69 # an incompatible way. Such changes should usually be detailed in the commit
70 # that breaks the format and have been previously discussed on the mailing list
71 # with general agreement from the core team.
72 #
73 OELAYOUT_ABI = "12"
74
75 # add poky sanity bbclass
76 INHERIT += "poky-sanity"
77
78 # QA check settings - a little stricter than the OE-Core defaults
79 WARN_TO_ERROR_QA = "already-stripped compile-host-path install-host-path \
80 ¦ ¦ ¦ ¦ installed-vs-shipped ldflags pn-overrides rpaths staticdev \
81 ¦ ¦ ¦ ¦ unknown-configure-option useless-rpaths"
82 WARN_QA_remove = "${WARN_TO_ERROR_QA}"
83 ERROR_QA_append = " ${WARN_TO_ERROR_QA}"
84
85 require conf/distro/include/poky-world-exclude.inc
86 require conf/distro/include/no-static-libs.inc
87 require conf/distro/include/yocto-uninative.inc
88 require conf/distro/include/security_flags.inc
89 INHERIT += "uninative"
DISTRO_FEATURES 更详细的可以看这里
PREFERRED_VERSION
SDK_NAME
SDKPATH
DISTRO_EXTRA_RDEPENDS
DISTRO_EXTRA_RRECOMMENDS
DISTRO_EXTRA_RDEPENDS
TCLIBCAPPEND
PREMIRRORS
OELAYOUT_ABI 这个不是poky定义的!
关于这几个头文件
poky-world-exclude.inc 空
no-static-libs.inc 禁用static链接 无需过多关注
security_flags.inc 编译时的安全标识 无需过多关注