blob: 06971da811787ef774c3adcf4fc87829eef584c7 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001##################################################################
2# Standard target filesystem paths.
3##################################################################
4#
5# If changing these values, beware that native/cross/nativesdk bbclass
6# files may also need changes to keep in sync.
7#
8
9# Used by multilib code to change the library paths
10baselib = "${BASELIB}"
11baselib[vardepvalue] = "${baselib}"
12BASELIB = "lib"
13BASELIB_powerpc64 = "lib64"
14
15# Path prefixes
16export base_prefix = ""
17export prefix = "/usr"
18export exec_prefix = "/usr"
19
20# Base paths
21export base_bindir = "${base_prefix}/bin"
22export base_sbindir = "${base_prefix}/sbin"
23export base_libdir = "${base_prefix}/${baselib}"
24export nonarch_base_libdir = "${base_prefix}/lib"
25
26# Architecture independent paths
27export sysconfdir = "${base_prefix}/etc"
28export servicedir = "${base_prefix}/srv"
29export sharedstatedir = "${base_prefix}/com"
30export localstatedir = "${base_prefix}/var"
31export datadir = "${prefix}/share"
32export infodir = "${datadir}/info"
33export mandir = "${datadir}/man"
34export docdir = "${datadir}/doc"
35export systemd_unitdir = "${nonarch_base_libdir}/systemd"
36export systemd_system_unitdir = "${nonarch_base_libdir}/systemd/system"
37export nonarch_libdir = "${exec_prefix}/lib"
38export systemd_user_unitdir = "${nonarch_libdir}/systemd/user"
39
40# Architecture dependent paths
41export bindir = "${exec_prefix}/bin"
42export sbindir = "${exec_prefix}/sbin"
43export libdir = "${exec_prefix}/${baselib}"
44export libexecdir = "${libdir}/${BPN}"
45export includedir = "${exec_prefix}/include"
46export oldincludedir = "${exec_prefix}/include"
47localedir = "${libdir}/locale"
48
49# Linkage between native/cross/nativesdk layouts
50base_bindir_native = "/bin"
51base_sbindir_native = "/sbin"
52sysconfdir_native = "/etc"
53prefix_native = "/usr"
54bindir_native = "${prefix_native}/bin"
55sbindir_native = "${prefix_native}/sbin"
56includedir_native = "${prefix_native}/include"
57libdir_native = "${prefix_native}/lib"
58libexecdir_native = "${libdir_native}/${BPN}"
59base_libdir_native = "/lib"
60datadir_native = "${prefix_native}/share"
61bindir_cross = "/bin"
62bindir_crossscripts = "${bindir}/crossscripts"
63prefix_nativesdk = "/usr"
64bindir_nativesdk = "${prefix_nativesdk}/bin"
65includedir_nativesdk = "${prefix_nativesdk}/include"
66libdir_nativesdk = "${prefix_nativesdk}/lib"
67base_libdir_nativesdk = "/lib"
68localstatedir_nativesdk = "/var"
69
70#
71# Cross recipes need to know about the target layout
72# := is used carefully here
73#
74target_datadir := "${datadir}"
75# Used to find env/perl/python
76USRBINPATH = "${bindir}"
77USRBINPATH_class-native = "/usr/bin"
78USRBINPATH_class-nativesdk = "/usr/bin"
79
80# Root home directory
81ROOT_HOME ??= "/home/root"
82
83##################################################################
84# Architecture-dependent build variables.
85##################################################################
86
87# Immediate expansion since there is no point in reapeatedly calling
88# os.uname() throughout parsing
89BUILD_ARCH := "${@os.uname()[4]}"
90BUILD_OS := "${@os.uname()[0].lower()}"
91BUILD_VENDOR = ""
92BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
93BUILD_PREFIX = ""
94BUILD_CC_ARCH = ""
95BUILD_LD_ARCH = ""
96BUILD_AS_ARCH = ""
97BUILD_EXEEXT = ""
98
99HOST_ARCH = "${TARGET_ARCH}"
100HOST_OS = "${TARGET_OS}"
101HOST_VENDOR = "${TARGET_VENDOR}"
102HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
103HOST_PREFIX = "${TARGET_PREFIX}"
104HOST_CC_ARCH = "${TARGET_CC_ARCH}"
105HOST_LD_ARCH = "${TARGET_LD_ARCH}"
106HOST_AS_ARCH = "${TARGET_AS_ARCH}"
107HOST_EXEEXT = ""
108
109TUNE_ARCH ??= "INVALID"
110TUNE_CCARGS ??= ""
111TUNE_CCARGS[vardepvalue] = "${TUNE_CCARGS}"
112TUNE_LDARGS ??= ""
113TUNE_ASARGS ??= ""
114TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
115LIBCEXTENSION ??= ""
116ABIEXTENSION ??= ""
117USE_NLS ??= "${@bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', 'yes', 'no', d)}"
118SDKUSE_NLS ??= "yes"
119
120TARGET_ARCH = "${TUNE_ARCH}"
121TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}"
122TARGET_VENDOR = "-oe"
123TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS', True), ''][d.getVar('TARGET_OS', True) == ('' or 'custom')]}"
124TARGET_PREFIX = "${TARGET_SYS}-"
125TARGET_CC_ARCH = "${TUNE_CCARGS}"
126TARGET_LD_ARCH = "${TUNE_LDARGS}"
127TARGET_AS_ARCH = "${TUNE_ASARGS}"
128
129SDK_ARCH = "${BUILD_ARCH}"
130SDK_OS = "${BUILD_OS}"
131SDK_VENDOR = "-oesdk"
132SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}"
133SDK_PREFIX = "${SDK_SYS}-"
134SDK_CC_ARCH = "${BUILD_CC_ARCH}"
135SDKPKGSUFFIX = "nativesdk"
136SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-${SDKPKGSUFFIX}"
137SDK_LD_ARCH = "${BUILD_LD_ARCH}"
138SDK_AS_ARCH = "${BUILD_AS_ARCH}"
139
140TUNE_PKGARCH ??= ""
141PACKAGE_ARCH ??= "${TUNE_PKGARCH}"
142MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}"
143PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
144PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
145# MACHINE_ARCH shouldn't be included here as a variable dependency
146# since machine specific packages are handled using multimachine
147PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH"
148
149MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
150MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
151
152##################################################################
153# Date/time variables.
154##################################################################
155
156DATE := "${@time.strftime('%Y%m%d',time.gmtime())}"
157TIME := "${@time.strftime('%H%M%S',time.gmtime())}"
158DATETIME = "${DATE}${TIME}"
159
160##################################################################
161# Openembedded Software Prerequisites.
162##################################################################
163
164# python-native should be here but python relies on building
165# its own in staging
166ASSUME_PROVIDED = "\
167 bzip2-native \
168 chrpath-native \
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500169 file-native \
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500170 git-native \
171 grep-native \
172 diffstat-native \
173 patch-native \
174 perl-native-runtime \
175 python-native-runtime \
176 tar-native \
177 virtual/libintl-native \
178 texinfo-native \
179 bash-native \
180 sed-native \
181 "
182# gzip-native should be listed above?
183
184##################################################################
185# Package default variables.
186##################################################################
187
188PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
189PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
190PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
191PF = "${PN}-${EXTENDPE}${PV}-${PR}"
192EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE', True) or 0) > 0]}"
193P = "${PN}-${PV}"
194
195EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO', True) is None]}"
196PRAUTOINX = "${PF}"
197
198PKGV ?= "${PV}"
199PKGR ?= "${PR}${EXTENDPRAUTO}"
200PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE', True) or 0) > 0]}"
201EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE', True).strip() != '']}"
202EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
203
204# Base package name
205# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
206# otherwise it is the same as PN and P
207SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -crosssdk -cross-canadian"
208BPN = "${@base_prune_suffix(d.getVar('PN', True), d.getVar('SPECIAL_PKGSUFFIX', True).split(), d)}"
209BP = "${BPN}-${PV}"
210
211# Package info.
212
213SECTION = "base"
214PRIORITY = "optional"
215SUMMARY ?= "${PN} version ${PV}-${PR}"
216DESCRIPTION ?= "${SUMMARY}."
217
218# The following two are commented out because they result in a recursive
219# definition of the variable in some corner cases. These are left in
220# to illustrate the intended behavior.
221#SUMMARY_${PN} ?= "${SUMMARY}"
222#DESCRIPTION_${PN} ?= "${DESCRIPTION}"
223
224SUMMARY_${PN}-dbg ?= "${SUMMARY} - Debugging files"
225DESCRIPTION_${PN}-dbg ?= "${DESCRIPTION} \
226This package contains ELF symbols and related sources for debugging purposes."
227
228SUMMARY_${PN}-dev ?= "${SUMMARY} - Development files"
229DESCRIPTION_${PN}-dev ?= "${DESCRIPTION} \
230This package contains symbolic links, header files, and \
231related items necessary for software development."
232
233SUMMARY_${PN}-staticdev ?= "${SUMMARY} - Development files (Static Libraries)"
234DESCRIPTION_${PN}-staticdev?= "${DESCRIPTION} \
235This package contains static libraries for software development."
236
237SUMMARY_${PN}-doc ?= "${SUMMARY} - Documentation files"
238DESCRIPTION_${PN}-doc ?= "${DESCRIPTION} \
239This package contains documentation."
240
241LICENSE = "INVALID"
242MAINTAINER = "OE-Core Developers <openembedded-core@lists.openembedded.org>"
243HOMEPAGE = ""
244
245# Package dependencies and provides.
246
247# Ensure that -dev packages recommend the corresponding -dev packages of their
248# deps, and the same for -dbg.
249DEPCHAIN_PRE = ""
250DEPCHAIN_POST = "-dev -dbg"
251
252DEPENDS = ""
253RDEPENDS = ""
254PROVIDES = ""
255PROVIDES_prepend = "${PN} "
256RPROVIDES = ""
257
258MULTI_PROVIDER_WHITELIST = "virtual/libintl virtual/libintl-native virtual/nativesdk-libintl virtual/xserver virtual/update-alternatives-native virtual/update-alternatives"
259
260SOLIBS = ".so.*"
261SOLIBS_darwin = ".dylib"
262
263SOLIBSDEV = ".so"
264# Due to the ordering of PACKAGES and the naming of the dev symlinks on darwin,
265# we can't make the symlinks end up in the -dev packages easily at this point. This hack
266# at least means builds aren't completely broken and symlinks don't take up much space.
267SOLIBSDEV_darwin = ".dylibbroken"
268
269PACKAGE_BEFORE_PN ?= ""
270PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
271PACKAGES_DYNAMIC = "^${PN}-locale-.*"
272FILES = ""
273
274FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
275 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
276 ${base_bindir}/* ${base_sbindir}/* \
277 ${base_libdir}/*${SOLIBS} \
278 ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
279 ${datadir}/${BPN} ${libdir}/${BPN}/* \
280 ${datadir}/pixmaps ${datadir}/applications \
281 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
282 ${libdir}/bonobo/servers"
283
284FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
285
286FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
287 ${datadir}/gnome/help"
288SECTION_${PN}-doc = "doc"
289
290FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
291FILES_${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \
292 ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \
293 ${datadir}/aclocal ${base_libdir}/*.o \
294 ${libdir}/${BPN}/*.la ${base_libdir}/*.la"
295SECTION_${PN}-dev = "devel"
296ALLOW_EMPTY_${PN}-dev = "1"
297RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"
298
299FILES_${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a"
300SECTION_${PN}-staticdev = "devel"
301RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})"
302
303DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
304 ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${BPN}/.debug \
305 ${libdir}/matchbox-panel/.debug ${libexecdir}/${BPN}/.debug /usr/src/debug"
306
307DEBUGFILEDIRECTORY-dbg = "/usr/lib/debug /usr/src/debug"
308
309FILES_${PN}-dbg = "${@d.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory'], True)}"
310
311SECTION_${PN}-dbg = "devel"
312ALLOW_EMPTY_${PN}-dbg = "1"
313
314FILES_${PN}-locale = "${datadir}/locale"
315
316# File manifest
317
318FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
319# FILESPATH is set in base.bbclass
320#FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
321# This default was only used for checking
322FILESEXTRAPATHS ?= "__default:"
323
324##################################################################
325# General work and output directories for the build system.
326##################################################################
327
328TMPDIR ?= "${TOPDIR}/tmp"
329CACHE = "${TMPDIR}/cache${@['', '/' + str(d.getVar('MACHINE', True))][bool(d.getVar('MACHINE', True))]}${@['', '/' + str(d.getVar('SDKMACHINE', True))][bool(d.getVar('SDKMACHINE', True))]}"
330# The persistent cache should be shared by all builds
331PERSISTENT_DIR = "${TOPDIR}/cache"
332LOG_DIR = "${TMPDIR}/log"
333CO_DIR = "${DL_DIR}"
334CVSDIR = "${CO_DIR}/cvs"
335SVNDIR = "${CO_DIR}/svn"
336GITDIR = "${CO_DIR}/git2"
337BZRDIR = "${CO_DIR}/bzr"
338HGDIR = "${CO_DIR}/hg"
339
340STAMPS_DIR ?= "${TMPDIR}/stamps"
341STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
342STAMPCLEAN = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/*-*"
343BASE_WORKDIR ?= "${TMPDIR}/work"
344WORKDIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
345T = "${WORKDIR}/temp"
346D = "${WORKDIR}/image"
347S = "${WORKDIR}/${BP}"
348B = "${S}"
349
350STAGING_DIR = "${TMPDIR}/sysroots"
351
352STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
353STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}"
354STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts"
355STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
356STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
357STAGING_LIBEXECDIR_NATIVE = "${STAGING_DIR_NATIVE}${libexecdir_native}"
358STAGING_BASE_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${base_libdir_native}"
359STAGING_SBINDIR_NATIVE = "${STAGING_DIR_NATIVE}${sbindir_native}"
360STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
361STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
362STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"
363
364STAGING_DIR_HOST = "${STAGING_DIR}/${MACHINE}"
365STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
366STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}"
367STAGING_LIBEXECDIR = "${STAGING_DIR_HOST}${libexecdir}"
368STAGING_BASELIBDIR = "${STAGING_DIR_HOST}${base_libdir}"
369STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"
370STAGING_DATADIR = "${STAGING_DIR_HOST}${datadir}"
371STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}"
372STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
373STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
374
375STAGING_DIR_TARGET = "${STAGING_DIR}/${MACHINE}"
376STAGING_DIR_TCBOOTSTRAP = "${STAGING_DIR_TARGET}-tcbootstrap"
377
378# Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using
379# packaged staging and/or multimachine.
380DEPLOY_DIR ?= "${TMPDIR}/deploy"
381DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
382DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
383DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
384DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
385DEPLOY_DIR_IMAGE ?= "${DEPLOY_DIR}/images/${MACHINE}"
386DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
387
388PKGDATA_DIR = "${STAGING_DIR_HOST}/pkgdata"
389
390##################################################################
391# SDK variables.
392##################################################################
393
394SDK_NAME_PREFIX ?= "oecore"
395SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}"
396SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
397SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
398
399##################################################################
400# Kernel info.
401##################################################################
402
403OLDEST_KERNEL = "2.6.32"
404OLDEST_KERNEL_aarch64 = "3.14"
405STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
406STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"
407
408##################################################################
409# Specific image creation and rootfs population info.
410##################################################################
411
412IMAGE_ROOTFS = "${WORKDIR}/rootfs"
413IMAGE_BASENAME = "${PN}"
414IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
415IMAGE_NAME[vardepsexclude] += "DATETIME"
416IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
417
418# This option allows for a percentage overage of the actual image size rather than a
419# fixed extra space, this is space needed for initial startup and basic operations.
420IMAGE_OVERHEAD_FACTOR ?= "1.3"
421# This option allows for adding additional space in K above and beyond what the
422# IMAGE_OVERHEAD_FACTOR might add. This space is for additional packages, user data, ...
423# To set a fixed size then overriding IMAGE_ROOTFS_SIZE with the max size one wants
424# should do the trick
425IMAGE_ROOTFS_EXTRA_SPACE ?= "0"
426
427EXTRA_IMAGEDEPENDS = ""
428
429##################################################################
430# Toolchain info.
431##################################################################
432
433PATH_prepend = "${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:"
434export PATH
435
436##################################################################
437# Build utility info.
438##################################################################
439
440CCACHE ??= ""
441# Disable ccache explicitly if CCACHE is null since gcc may be a symlink
442# of ccache some distributions (e.g., Fedora 17).
443export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}"
444# Assign CCACHE_DIR a default value to fix a bug of ccache 3.1.7,
445# since it would always create CCACHE_DIR/.ccache even if
446# CCACHE_DISABLE = 1.
447export CCACHE_DIR ??= "${@os.getenv('HOME')}"
448
449TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
450
451export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
452export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
453export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
454export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
455export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}"
456export CCLD = "${CC}"
457export AR = "${HOST_PREFIX}ar"
458export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}"
459export RANLIB = "${HOST_PREFIX}ranlib"
460export STRIP = "${HOST_PREFIX}strip"
461export OBJCOPY = "${HOST_PREFIX}objcopy"
462export OBJDUMP = "${HOST_PREFIX}objdump"
463export STRINGS = "${HOST_PREFIX}strings"
464export NM = "${HOST_PREFIX}nm"
465PYTHON = "${@sys.executable}"
466
467export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
468export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
469export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
470export BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E"
471export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
472export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
473export BUILD_AR = "${BUILD_PREFIX}ar"
474export BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}"
475export BUILD_RANLIB = "${BUILD_PREFIX}ranlib"
476export BUILD_STRIP = "${BUILD_PREFIX}strip"
477export BUILD_NM = "${BUILD_PREFIX}nm"
478
479export MAKE = "make"
480EXTRA_OEMAKE = "-e MAKEFLAGS="
481EXTRA_OECONF = ""
482export LC_ALL = "C"
483
484##################################################################
485# Patch handling.
486##################################################################
487PATCHTOOL = "quilt"
488PATCHRESOLVE = "noop"
489
490##################################################################
491# Build flags and options.
492##################################################################
493
494export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
495BUILDSDK_CPPFLAGS = "-isystem${STAGING_INCDIR}"
496export CPPFLAGS = "${TARGET_CPPFLAGS}"
497export TARGET_CPPFLAGS = ""
498#export TARGET_CPPFLAGS = "-isystem${STAGING_DIR_TARGET}${includedir}"
499
500export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
501BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION}"
502export CFLAGS = "${TARGET_CFLAGS}"
503export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
504
505export BUILD_CXXFLAGS = "${BUILD_CFLAGS}"
506export CXXFLAGS = "${TARGET_CXXFLAGS}"
507export TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
508
509export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
510 -L${STAGING_BASE_LIBDIR_NATIVE} \
511 -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \
512 -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} \
513 -Wl,-rpath,${STAGING_LIBDIR_NATIVE} \
514 -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE} \
515 -Wl,-O1"
516
517BUILDSDK_LDFLAGS = "-L${STAGING_LIBDIR} \
518 -Wl,-rpath-link,${STAGING_LIBDIR} \
519 -Wl,-rpath,${libdir} -Wl,-O1 \
520 -L${STAGING_DIR_HOST}${base_libdir} \
521 -Wl,-rpath-link,${STAGING_DIR_HOST}${base_libdir} \
522 -Wl,-rpath,${base_libdir} -Wl,-O1"
523
524LINKER_HASH_STYLE ??= "gnu"
525# mips does not support GNU hash style therefore we override
526LINKER_HASH_STYLE_mips = "sysv"
527LINKER_HASH_STYLE_mipsel = "sysv"
528LINKER_HASH_STYLE_mips64 = "sysv"
529LINKER_HASH_STYLE_mips64el = "sysv"
530LINKER_HASH_STYLE_mips64n32 = "sysv"
531LINKER_HASH_STYLE_mips64eln32 = "sysv"
532TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}"
533
534export LDFLAGS = "${TARGET_LDFLAGS}"
535export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
536#export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \
537# -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir} \
538# -Wl,-O1"
539
540# Which flags to leave by strip-flags() in bin/build/oebuild.sh ?
541ALLOWED_FLAGS = "-O -mcpu -march -pipe"
542
543# Pass parallel make options to the compile task
544EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
545PARALLEL_MAKEINST ??= "${PARALLEL_MAKE}"
546# Pass parallel make options to the install task
547EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} "
548
549##################################################################
550# Optimization flags.
551##################################################################
552DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types"
553# Disabled until the option works properly -feliminate-dwarf2-dups
554FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
555DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
556SELECTED_OPTIMIZATION = "${@d.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD', True) == '1'], True)}"
557SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION"
558BUILD_OPTIMIZATION = "-O2 -pipe"
559
560##################################################################
561# Settings used by bitbake-layers.
562##################################################################
563BBLAYERS_LAYERINDEX_URL ??= "http://layers.openembedded.org/layerindex/"
564BBLAYERS_FETCH_DIR ??= "${COREBASE}"
565
566##################################################################
567# Download locations and utilities.
568##################################################################
569
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500570APACHE_MIRROR = "http://archive.apache.org/dist"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500571DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
572GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
573GNOME_GIT = "git://git.gnome.org"
574GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
575GNU_MIRROR = "http://ftp.gnu.org/gnu"
576GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
577KERNELORG_MIRROR = "http://kernel.org/pub"
578SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"
579XLIBS_MIRROR = "http://xlibs.freedesktop.org/release"
580XORG_MIRROR = "http://xorg.freedesktop.org/releases"
581SAVANNAH_GNU_MIRROR = "http://download.savannah.gnu.org/releases"
582SAVANNAH_NONGNU_MIRROR = "http://download.savannah.nongnu.org/releases"
583CPAN_MIRROR = "http://search.cpan.org/CPAN"
584
585SRC_URI[vardepsexclude] += "\
586 APACHE_MIRROR \
587 CPAN_MIRROR \
588 DEBIAN_MIRROR \
589 GENTOO_MIRROR \
590 GNOME_GIT \
591 GNOME_MIRROR \
592 GNU_MIRROR \
593 GPE_MIRROR \
594 KERNELORG_MIRROR \
595 SAVANNAH_GNU_MIRROR \
596 SAVANNAH_NONGNU_MIRROR \
597 SOURCEFORGE_MIRROR \
598 XLIBS_MIRROR \
599 XORG_MIRROR \
600"
601
602# You can use the mirror of your country to get faster downloads by putting
603# export DEBIAN_MIRROR = "ftp://ftp.de.debian.org/debian/pool"
604# into your local.conf
605
606FETCHCMD_svn = "/usr/bin/env svn --non-interactive --trust-server-cert"
607FETCHCMD_cvs = "/usr/bin/env cvs"
608FETCHCMD_wget = "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
609FETCHCMD_bzr = "/usr/bin/env bzr"
610FETCHCMD_hg = "/usr/bin/env hg"
611
612SRCDATE = "${DATE}"
613SRCREV ??= "INVALID"
614AUTOREV = "${@bb.fetch2.get_autorev(d)}"
615SRCPV = "${@bb.fetch2.get_srcrev(d)}"
616SRCPV[vardepvalue] = "${SRCPV}"
617
618SRC_URI = ""
619
620# Use pseudo as the fakeroot implementation
621PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
622PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}"
623export PSEUDO_DISABLED = "1"
624#export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
625#export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
626#export PSEUDO_LIBDIR = "${STAGING_DIR_NATIVE}$PSEUDOBINDIR/../lib/pseudo/lib
627FAKEROOTBASEENV = "PSEUDO_BINDIR=${STAGING_BINDIR_NATIVE} PSEUDO_LIBDIR=${STAGING_BINDIR_NATIVE}/../lib/pseudo/lib PSEUDO_PREFIX=${STAGING_BINDIR_NATIVE}/../../ PSEUDO_DISABLED=1"
628FAKEROOTCMD = "${STAGING_BINDIR_NATIVE}/pseudo"
629FAKEROOTENV = "PSEUDO_PREFIX=${STAGING_DIR_NATIVE}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0"
630FAKEROOTNOENV = "PSEUDO_UNLOAD=1"
631FAKEROOTDIRS = "${PSEUDO_LOCALSTATEDIR}"
632PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native"
633
634##################################################################
635# Miscellaneous utilities.
636##################################################################
637
638# GNU patch tries to be intellgent about checking out read-only files from
639# a RCS, which freaks out those special folks with active Perforce clients
640# the following makes patch ignore RCS:
641
642export PATCH_GET="0"
643
644##################################################################
645# Not sure about the rest of this yet.
646##################################################################
647
648# Pre-build configuration output
649BUILDCFG_HEADER = "Build Configuration:"
650BUILDCFG_VARS = "BB_VERSION BUILD_SYS NATIVELSBSTRING TARGET_SYS MACHINE DISTRO DISTRO_VERSION TUNE_FEATURES TARGET_FPU"
651BUILDCFG_VARS[type] = "list"
652BUILDCFG_NEEDEDVARS = "TARGET_ARCH TARGET_OS"
653BUILDCFG_NEEDEDVARS[type] = "list"
654
655# Other
656
657export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
658export PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
659export PKG_CONFIG_LIBDIR = "${PKG_CONFIG_DIR}"
660export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
661export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
662
663###
664### Config file processing
665###
666
667# An empty distro leads to :: entries in OVERRIDES and FILEOVERRIDES which
668# is a bad idea. Setting a dummy value is better than a ton of anonymous python.
669DISTRO ??= "nodistro"
670DISTRO_NAME ??= "OpenEmbedded"
671# Overrides are processed left to right, so the ones that are named later take precedence.
672# You generally want them to go from least to most specific.
673#
674# This means that an envionment variable named '<foo>_arm' overrides an
675# environment variable '<foo>' (when ${TARGET_ARCH} is arm).
676# An environment variable '<foo>_qemuarm' overrides '<foo>' and overrides
677# '<foo>_arm' when ${MACHINE} is 'qemuarm'.
678# If you use combination ie '<foo>_qemuarm_arm', then '<foo>_qemuarm_arm' will override
679# '<foo>_qemuarm' and then '<foo>' will be overriden with that value from '<foo>_qemuarm'.
680# And finally '<foo>_forcevariable' overrides any standard variable, with the highest priority.
681#
682# This works for functions as well, they are really just environment variables.
683# Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
684OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:forcevariable"
685OVERRIDES[vardepsexclude] = "MACHINEOVERRIDES"
686CLASSOVERRIDE ?= "class-target"
687DISTROOVERRIDES ?= "${@d.getVar('DISTRO', True) or ''}"
688MACHINEOVERRIDES ?= "${MACHINE}"
689MACHINEOVERRIDES[vardepsexclude] = "MACHINE"
690
691FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
692
693##################################################################
694# Include the rest of the config files.
695##################################################################
696
697require conf/abi_version.conf
698include conf/site.conf
699include conf/auto.conf
700include conf/local.conf
701include conf/build/${BUILD_SYS}.conf
702include conf/target/${TARGET_SYS}.conf
703include conf/machine/${MACHINE}.conf
704include conf/machine-sdk/${SDKMACHINE}.conf
705include conf/distro/${DISTRO}.conf
706include conf/distro/defaultsetup.conf
707include conf/documentation.conf
708include conf/licenses.conf
709require conf/sanity.conf
710
711##################################################################
712# Weak variables (usually to retain backwards compatibility)
713##################################################################
714
715DL_DIR ?= "${TOPDIR}/downloads"
716SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
717IMAGE_FSTYPES ?= "tar.gz"
718INITRAMFS_FSTYPES ?= "cpio.gz"
719DEFAULT_TASK_PROVIDER ?= "packagegroup-base"
720MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
721
722# The size in Kbytes for the generated image if it is larger than
723# the required size (du -ks IMAGE_ROOTFS * IMAGE_OVERHEAD_FACTOR),
724# and no effect if less than it.
725IMAGE_ROOTFS_SIZE ??= "65536"
726
727# Forcefully set CACHE now so future changes to things like
728# MACHINE don't change the path to the cache
729CACHE := "${CACHE}"
730
731# Default to setting automatically based on cpu count
732BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
733
734# Default to setting automatically based on cpu count
735PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
736
737##################################################################
738# Magic Cookie for SANITY CHECK
739##################################################################
740OES_BITBAKE_CONF = "1"
741
742##################################################################
743# Machine properties and packagegroup-base stuff
744##################################################################
745
746MACHINE_FEATURES ?= ""
747DISTRO_FEATURES ?= ""
748
749DISTRO_EXTRA_RDEPENDS ?= ""
750DISTRO_EXTRA_RRECOMMENDS ?= ""
751MACHINE_EXTRA_RDEPENDS ?= ""
752MACHINE_EXTRA_RRECOMMENDS ?= ""
753MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
754MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
755
756EXTRA_IMAGE_FEATURES ??= ""
757IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
758
759DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
760MACHINE_FEATURES_BACKFILL = "rtc"
761
762COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}"
763COMBINED_FEATURES[vardeps] += "DISTRO_FEATURES MACHINE_FEATURES"
764
765SERIAL_CONSOLE ??= ""
766SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE', True).replace(' ', ';')}"
767
768NO_RECOMMENDATIONS ?= ""
769BAD_RECOMMENDATIONS ?= ""
770
771# Make sure MACHINE isn't exported
772# (breaks binutils at least)
773MACHINE[unexport] = "1"
774
775# Make sure TARGET_ARCH isn't exported
776# (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this
777# in them, undocumented)
778TARGET_ARCH[unexport] = "1"
779
780# Make sure DISTRO isn't exported
781# (breaks sysvinit at least)
782DISTRO[unexport] = "1"
783
784# Make sure SHELL isn't exported
785# (can break any number of things if the user's shell isn't POSIX-compliant,
786# including the flock command). The user's shell shouldn't affect our builds.
787SHELL[unexport] = "1"
788
789# Used by canadian-cross to handle string conversions on TARGET_ARCH where needed
790TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH', True).replace("_", "-")}"
791
792# Complete output from bitbake
793BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log"
794
795# Setup our default hash policy
796BB_SIGNATURE_HANDLER ?= "OEBasicHash"
797BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
798 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
799 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
800 PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
801 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX \
802 WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH"
803BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
804 SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
805 PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED"
806BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
807 lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \
808 file-checksums python func task export unexport noexec nostamp dirs cleandirs \
809 sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500810 recrdeptask nodeprrecs stamp-base stamp-extra-info sstate-outputdirs"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500811
812MLPREFIX ??= ""
813MULTILIB_VARIANTS ??= ""