xref: /OK3568_Linux_fs/yocto/build/conf/include/common.conf (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# This file is your local configuration file and is where all local user settings
3*4882a593Smuzhiyun# are placed. The comments in this file give some guide to the options a new user
4*4882a593Smuzhiyun# to the system might want to change but pretty much any configuration option can
5*4882a593Smuzhiyun# be set in this file. More adventurous users can look at
6*4882a593Smuzhiyun# local.conf.sample.extended which contains other examples of configuration which
7*4882a593Smuzhiyun# can be placed in this file but new users likely won't need any of them
8*4882a593Smuzhiyun# initially.
9*4882a593Smuzhiyun#
10*4882a593Smuzhiyun# Lines starting with the '#' character are commented out and in some cases the
11*4882a593Smuzhiyun# default values are provided as comments to show people example syntax. Enabling
12*4882a593Smuzhiyun# the option is a question of removing the # character and making any change to the
13*4882a593Smuzhiyun# variable as required.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun#
16*4882a593Smuzhiyun# Machine Selection
17*4882a593Smuzhiyun#
18*4882a593Smuzhiyun# You need to select a specific machine to target the build with. There are a selection
19*4882a593Smuzhiyun# of emulated machines available which can boot and run in the QEMU emulator:
20*4882a593Smuzhiyun#
21*4882a593Smuzhiyun#MACHINE ?= "qemuarm"
22*4882a593Smuzhiyun#MACHINE ?= "qemuarm64"
23*4882a593Smuzhiyun#MACHINE ?= "qemumips"
24*4882a593Smuzhiyun#MACHINE ?= "qemumips64"
25*4882a593Smuzhiyun#MACHINE ?= "qemuppc"
26*4882a593Smuzhiyun#MACHINE ?= "qemux86"
27*4882a593Smuzhiyun#MACHINE ?= "qemux86-64"
28*4882a593Smuzhiyun#
29*4882a593Smuzhiyun# There are also the following hardware board target machines included for
30*4882a593Smuzhiyun# demonstration purposes:
31*4882a593Smuzhiyun#
32*4882a593Smuzhiyun#MACHINE ?= "beaglebone-yocto"
33*4882a593Smuzhiyun#MACHINE ?= "genericx86"
34*4882a593Smuzhiyun#MACHINE ?= "genericx86-64"
35*4882a593Smuzhiyun#MACHINE ?= "edgerouter"
36*4882a593Smuzhiyun#
37*4882a593Smuzhiyun# This sets the default machine to be qemux86-64 if no other machine is selected:
38*4882a593SmuzhiyunMACHINE ??= "qemux86-64"
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun#
41*4882a593Smuzhiyun# Where to place downloads
42*4882a593Smuzhiyun#
43*4882a593Smuzhiyun# During a first build the system will download many different source code tarballs
44*4882a593Smuzhiyun# from various upstream projects. This can take a while, particularly if your network
45*4882a593Smuzhiyun# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
46*4882a593Smuzhiyun# can preserve this directory to speed up this part of subsequent builds. This directory
47*4882a593Smuzhiyun# is safe to share between multiple builds on the same machine too.
48*4882a593Smuzhiyun#
49*4882a593Smuzhiyun# The default is a downloads directory under TOPDIR which is the build directory.
50*4882a593Smuzhiyun#
51*4882a593SmuzhiyunDL_DIR ?= "${TOPDIR}/../packages"
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun#
54*4882a593Smuzhiyun# Where to place shared-state files
55*4882a593Smuzhiyun#
56*4882a593Smuzhiyun# BitBake has the capability to accelerate builds based on previously built output.
57*4882a593Smuzhiyun# This is done using "shared state" files which can be thought of as cache objects
58*4882a593Smuzhiyun# and this option determines where those files are placed.
59*4882a593Smuzhiyun#
60*4882a593Smuzhiyun# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
61*4882a593Smuzhiyun# from these files if no changes were made to the configuration. If changes were made
62*4882a593Smuzhiyun# to the configuration, only shared state files where the state was still valid would
63*4882a593Smuzhiyun# be used (done using checksums).
64*4882a593Smuzhiyun#
65*4882a593Smuzhiyun# The default is a sstate-cache directory under TOPDIR.
66*4882a593Smuzhiyun#
67*4882a593Smuzhiyun#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun#
70*4882a593Smuzhiyun# Where to place the build output
71*4882a593Smuzhiyun#
72*4882a593Smuzhiyun# This option specifies where the bulk of the building work should be done and
73*4882a593Smuzhiyun# where BitBake should place its temporary files and output. Keep in mind that
74*4882a593Smuzhiyun# this includes the extraction and compilation of many applications and the toolchain
75*4882a593Smuzhiyun# which can use Gigabytes of hard disk space.
76*4882a593Smuzhiyun#
77*4882a593Smuzhiyun# The default is a tmp directory under TOPDIR.
78*4882a593Smuzhiyun#
79*4882a593Smuzhiyun#TMPDIR = "${TOPDIR}/tmp"
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun#
82*4882a593Smuzhiyun# Default policy config
83*4882a593Smuzhiyun#
84*4882a593Smuzhiyun# The distribution setting controls which policy settings are used as defaults.
85*4882a593Smuzhiyun# The default value is fine for general Yocto project use, at least initially.
86*4882a593Smuzhiyun# Ultimately when creating custom policy, people will likely end up subclassing
87*4882a593Smuzhiyun# these defaults.
88*4882a593Smuzhiyun#
89*4882a593SmuzhiyunDISTRO ?= "poky"
90*4882a593Smuzhiyun# As an example of a subclass there is a "bleeding" edge policy configuration
91*4882a593Smuzhiyun# where many versions are set to the absolute latest code from the upstream
92*4882a593Smuzhiyun# source control systems. This is just mentioned here as an example, its not
93*4882a593Smuzhiyun# useful to most new users.
94*4882a593Smuzhiyun# DISTRO ?= "poky-bleeding"
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun#
97*4882a593Smuzhiyun# Package Management configuration
98*4882a593Smuzhiyun#
99*4882a593Smuzhiyun# This variable lists which packaging formats to enable. Multiple package backends
100*4882a593Smuzhiyun# can be enabled at once and the first item listed in the variable will be used
101*4882a593Smuzhiyun# to generate the root filesystems.
102*4882a593Smuzhiyun# Options are:
103*4882a593Smuzhiyun#  - 'package_deb' for debian style deb files
104*4882a593Smuzhiyun#  - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
105*4882a593Smuzhiyun#  - 'package_rpm' for rpm style packages
106*4882a593Smuzhiyun# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
107*4882a593Smuzhiyun# We default to rpm:
108*4882a593SmuzhiyunPACKAGE_CLASSES ?= "package_rpm"
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun#
111*4882a593Smuzhiyun# SDK target architecture
112*4882a593Smuzhiyun#
113*4882a593Smuzhiyun# This variable specifies the architecture to build SDK items for and means
114*4882a593Smuzhiyun# you can build the SDK packages for architectures other than the machine you are
115*4882a593Smuzhiyun# running the build on (i.e. building i686 packages on an x86_64 host).
116*4882a593Smuzhiyun# Supported values are i686, x86_64, aarch64
117*4882a593Smuzhiyun#SDKMACHINE ?= "i686"
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun#
120*4882a593Smuzhiyun# Extra image configuration defaults
121*4882a593Smuzhiyun#
122*4882a593Smuzhiyun# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
123*4882a593Smuzhiyun# images. Some of these options are added to certain image types automatically. The
124*4882a593Smuzhiyun# variable can contain the following options:
125*4882a593Smuzhiyun#  "dbg-pkgs"       - add -dbg packages for all installed packages
126*4882a593Smuzhiyun#                     (adds symbol information for debugging/profiling)
127*4882a593Smuzhiyun#  "src-pkgs"       - add -src packages for all installed packages
128*4882a593Smuzhiyun#                     (adds source code for debugging)
129*4882a593Smuzhiyun#  "dev-pkgs"       - add -dev packages for all installed packages
130*4882a593Smuzhiyun#                     (useful if you want to develop against libs in the image)
131*4882a593Smuzhiyun#  "ptest-pkgs"     - add -ptest packages for all ptest-enabled packages
132*4882a593Smuzhiyun#                     (useful if you want to run the package test suites)
133*4882a593Smuzhiyun#  "tools-sdk"      - add development tools (gcc, make, pkgconfig etc.)
134*4882a593Smuzhiyun#  "tools-debug"    - add debugging tools (gdb, strace)
135*4882a593Smuzhiyun#  "eclipse-debug"  - add Eclipse remote debugging support
136*4882a593Smuzhiyun#  "tools-profile"  - add profiling tools (oprofile, lttng, valgrind)
137*4882a593Smuzhiyun#  "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
138*4882a593Smuzhiyun#  "debug-tweaks"   - make an image suitable for development
139*4882a593Smuzhiyun#                     e.g. ssh root access has a blank password
140*4882a593Smuzhiyun# There are other application targets that can be used here too, see
141*4882a593Smuzhiyun# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
142*4882a593Smuzhiyun# We default to enabling the debugging tweaks.
143*4882a593SmuzhiyunEXTRA_IMAGE_FEATURES ?= "debug-tweaks"
144*4882a593Smuzhiyun
145*4882a593Smuzhiyun#
146*4882a593Smuzhiyun# Additional image features
147*4882a593Smuzhiyun#
148*4882a593Smuzhiyun# The following is a list of additional classes to use when building images which
149*4882a593Smuzhiyun# enable extra features. Some available options which can be included in this variable
150*4882a593Smuzhiyun# are:
151*4882a593Smuzhiyun#   - 'buildstats' collect build statistics
152*4882a593SmuzhiyunUSER_CLASSES ?= "buildstats"
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun#
155*4882a593Smuzhiyun# Runtime testing of images
156*4882a593Smuzhiyun#
157*4882a593Smuzhiyun# The build system can test booting virtual machine images under qemu (an emulator)
158*4882a593Smuzhiyun# after any root filesystems are created and run tests against those images. It can also
159*4882a593Smuzhiyun# run tests against any SDK that are built. To enable this uncomment these lines.
160*4882a593Smuzhiyun# See classes/test{image,sdk}.bbclass for further details.
161*4882a593Smuzhiyun#IMAGE_CLASSES += "testimage testsdk"
162*4882a593Smuzhiyun#TESTIMAGE_AUTO:qemuall = "1"
163*4882a593Smuzhiyun
164*4882a593Smuzhiyun#
165*4882a593Smuzhiyun# Interactive shell configuration
166*4882a593Smuzhiyun#
167*4882a593Smuzhiyun# Under certain circumstances the system may need input from you and to do this it
168*4882a593Smuzhiyun# can launch an interactive shell. It needs to do this since the build is
169*4882a593Smuzhiyun# multithreaded and needs to be able to handle the case where more than one parallel
170*4882a593Smuzhiyun# process may require the user's attention. The default is iterate over the available
171*4882a593Smuzhiyun# terminal types to find one that works.
172*4882a593Smuzhiyun#
173*4882a593Smuzhiyun# Examples of the occasions this may happen are when resolving patches which cannot
174*4882a593Smuzhiyun# be applied, to use the devshell or the kernel menuconfig
175*4882a593Smuzhiyun#
176*4882a593Smuzhiyun# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
177*4882a593Smuzhiyun# Note: currently, Konsole support only works for KDE 3.x due to the way
178*4882a593Smuzhiyun# newer Konsole versions behave
179*4882a593Smuzhiyun#OE_TERMINAL = "auto"
180*4882a593Smuzhiyun# By default disable interactive patch resolution (tasks will just fail instead):
181*4882a593SmuzhiyunPATCHRESOLVE = "noop"
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun#
184*4882a593Smuzhiyun# Disk Space Monitoring during the build
185*4882a593Smuzhiyun#
186*4882a593Smuzhiyun# Monitor the disk space during the build. If there is less that 1GB of space or less
187*4882a593Smuzhiyun# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
188*4882a593Smuzhiyun# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard halt
189*4882a593Smuzhiyun# of the build. The reason for this is that running completely out of space can corrupt
190*4882a593Smuzhiyun# files and damages the build in ways which may not be easily recoverable.
191*4882a593Smuzhiyun# It's necessary to monitor /tmp, if there is no space left the build will fail
192*4882a593Smuzhiyun# with very exotic errors.
193*4882a593SmuzhiyunBB_DISKMON_DIRS ??= "\
194*4882a593Smuzhiyun    STOPTASKS,${TMPDIR},1G,100K \
195*4882a593Smuzhiyun    STOPTASKS,${DL_DIR},1G,100K \
196*4882a593Smuzhiyun    STOPTASKS,${SSTATE_DIR},1G,100K \
197*4882a593Smuzhiyun    STOPTASKS,/tmp,100M,100K \
198*4882a593Smuzhiyun    HALT,${TMPDIR},100M,1K \
199*4882a593Smuzhiyun    HALT,${DL_DIR},100M,1K \
200*4882a593Smuzhiyun    HALT,${SSTATE_DIR},100M,1K \
201*4882a593Smuzhiyun    HALT,/tmp,10M,1K"
202*4882a593Smuzhiyun
203*4882a593Smuzhiyun#
204*4882a593Smuzhiyun# Shared-state files from other locations
205*4882a593Smuzhiyun#
206*4882a593Smuzhiyun# As mentioned above, shared state files are prebuilt cache data objects which can be
207*4882a593Smuzhiyun# used to accelerate build time. This variable can be used to configure the system
208*4882a593Smuzhiyun# to search other mirror locations for these objects before it builds the data itself.
209*4882a593Smuzhiyun#
210*4882a593Smuzhiyun# This can be a filesystem directory, or a remote url such as https or ftp. These
211*4882a593Smuzhiyun# would contain the sstate-cache results from previous builds (possibly from other
212*4882a593Smuzhiyun# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
213*4882a593Smuzhiyun# cache locations to check for the shared objects.
214*4882a593Smuzhiyun# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
215*4882a593Smuzhiyun# at the end as shown in the examples below. This will be substituted with the
216*4882a593Smuzhiyun# correct path within the directory structure.
217*4882a593Smuzhiyun#SSTATE_MIRRORS ?= "\
218*4882a593Smuzhiyun#file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
219*4882a593Smuzhiyun#file://.* file:///some/local/dir/sstate/PATH"
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun#
222*4882a593Smuzhiyun# Yocto Project SState Mirror
223*4882a593Smuzhiyun#
224*4882a593Smuzhiyun# The Yocto Project has prebuilt artefacts available for its releases, you can enable
225*4882a593Smuzhiyun# use of these by uncommenting the following lines. This will mean the build uses
226*4882a593Smuzhiyun# the network to check for artefacts at the start of builds, which does slow it down
227*4882a593Smuzhiyun# equally, it will also speed up the builds by not having to build things if they are
228*4882a593Smuzhiyun# present in the cache. It assumes you can download something faster than you can build it
229*4882a593Smuzhiyun# which will depend on your network.
230*4882a593Smuzhiyun# Note: For this to work you also need hash-equivalence passthrough to the matching server
231*4882a593Smuzhiyun#
232*4882a593Smuzhiyun#BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687"
233*4882a593Smuzhiyun#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/3.4/PATH;downloadfilename=PATH"
234*4882a593Smuzhiyun
235*4882a593Smuzhiyun#
236*4882a593Smuzhiyun# Qemu configuration
237*4882a593Smuzhiyun#
238*4882a593Smuzhiyun# By default native qemu will build with a builtin VNC server where graphical output can be
239*4882a593Smuzhiyun# seen. The line below enables the SDL UI frontend too.
240*4882a593SmuzhiyunPACKAGECONFIG:append:pn-qemu-system-native = " sdl"
241*4882a593Smuzhiyun# By default libsdl2-native will be built, if you want to use your host's libSDL instead of
242*4882a593Smuzhiyun# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
243*4882a593Smuzhiyun#ASSUME_PROVIDED += "libsdl2-native"
244*4882a593Smuzhiyun
245*4882a593Smuzhiyun# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds
246*4882a593Smuzhiyun# a handy set of menus for controlling the emulator.
247*4882a593Smuzhiyun#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
248*4882a593Smuzhiyun
249*4882a593Smuzhiyun#
250*4882a593Smuzhiyun# Hash Equivalence
251*4882a593Smuzhiyun#
252*4882a593Smuzhiyun# Enable support for automatically running a local hash equivalence server and
253*4882a593Smuzhiyun# instruct bitbake to use a hash equivalence aware signature generator. Hash
254*4882a593Smuzhiyun# equivalence improves reuse of sstate by detecting when a given sstate
255*4882a593Smuzhiyun# artifact can be reused as equivalent, even if the current task hash doesn't
256*4882a593Smuzhiyun# match the one that generated the artifact.
257*4882a593Smuzhiyun#
258*4882a593Smuzhiyun# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
259*4882a593Smuzhiyun#
260*4882a593Smuzhiyun#BB_HASHSERVE = "auto"
261*4882a593Smuzhiyun#BB_SIGNATURE_HANDLER = "OEEquivHash"
262*4882a593Smuzhiyun
263*4882a593Smuzhiyun#
264*4882a593Smuzhiyun# Memory Resident Bitbake
265*4882a593Smuzhiyun#
266*4882a593Smuzhiyun# Bitbake's server component can stay in memory after the UI for the current command
267*4882a593Smuzhiyun# has completed. This means subsequent commands can run faster since there is no need
268*4882a593Smuzhiyun# for bitbake to reload cache files and so on. Number is in seconds, after which the
269*4882a593Smuzhiyun# server will shut down.
270*4882a593Smuzhiyun#
271*4882a593Smuzhiyun#BB_SERVER_TIMEOUT = "60"
272*4882a593Smuzhiyun
273*4882a593Smuzhiyun# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
274*4882a593Smuzhiyun# track the version of this file when it was generated. This can safely be ignored if
275*4882a593Smuzhiyun# this doesn't mean anything to you.
276*4882a593SmuzhiyunCONF_VERSION = "2"
277*4882a593Smuzhiyun
278*4882a593Smuzhiyun# Prefer local mirrors
279*4882a593SmuzhiyunSOURCE_MIRROR_URL ?= "file:///${TOPDIR}/../packages/"
280*4882a593SmuzhiyunINHERIT:append = " own-mirrors"
281*4882a593SmuzhiyunBB_GENERATE_MIRROR_TARBALLS = "1"
282*4882a593Smuzhiyun
283*4882a593SmuzhiyunINSANE_SKIP:append = " host-user-contaminated"
284*4882a593SmuzhiyunWARN_QA:remove = "patch-fuzz"
285*4882a593Smuzhiyun
286*4882a593SmuzhiyunDISTRO_FEATURES:remove = "vulkan"
287*4882a593Smuzhiyun
288*4882a593SmuzhiyunIMAGE_INSTALL:append = " udev-conf-rockchip os-release"
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun# Enable Rockchip style images
291*4882a593SmuzhiyunROCKCHIP_KERNEL_IMAGES = "1"
292*4882a593SmuzhiyunROCKCHIP_KERNEL_COMPRESSED = "1"
293