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