netbase: fix non working wpa_supplicant detection in network restarts. Push PR.
[openembedded.git] / conf / bitbake.conf
1 ##################################################################
2 # Recipe Parsing
3 ##################################################################
4 BBMASK = "/(nonworking|obsolete)/"
5
6 ##################################################################
7 # Standard target filesystem layout.
8 ##################################################################
9
10 # Path prefixes
11 layout_prefix = "${prefix}"
12 layout_exec_prefix = "${exec_prefix}"
13 layout_base_prefix = "${base_prefix}"
14
15 # Base paths
16 layout_base_bindir = "${base_bindir}"
17 layout_base_sbindir = "${base_sbindir}"
18 layout_base_libdir = "${base_libdir}"
19
20 # Architecture independent paths
21 layout_sysconfdir = "${sysconfdir}"
22 layout_localstatedir = "${localstatedir}"
23 layout_servicedir = "${servicedir}"
24 layout_sharedstatedir = "${sharedstatedir}"
25 layout_datadir = "${datadir}"
26 layout_infodir = "${infodir}"
27 layout_mandir = "${mandir}"
28 layout_docdir = "${docdir}"
29
30 # Architecture dependent paths
31 layout_bindir = "${bindir}"
32 layout_sbindir = "${sbindir}"
33 layout_libdir = "${libdir}"
34 layout_includedir = "${includedir}"
35 layout_libexecdir = "${libexecdir}"
36
37 ##################################################################
38 # Standard target filesystem paths.
39 ##################################################################
40
41 # Path prefixes
42 export base_prefix = ""
43 export prefix = "/usr"
44 export exec_prefix = "/usr"
45
46 # Base paths
47 export base_bindir = "${base_prefix}/bin"
48 export base_sbindir = "${base_prefix}/sbin"
49 export base_libdir = "${base_prefix}/lib"
50
51 # Architecture independent paths
52 export datadir = "${prefix}/share"
53 export sysconfdir = "${base_prefix}/etc"
54 export servicedir = "${base_prefix}/srv"
55 export sharedstatedir = "${base_prefix}/com"
56 export localstatedir = "${base_prefix}/var"
57 export infodir = "${datadir}/info"
58 export mandir = "${datadir}/man"
59 export docdir = "${datadir}/doc"
60
61 # Architecture dependent paths
62 export bindir = "${exec_prefix}/bin"
63 export sbindir = "${exec_prefix}/sbin"
64 export libexecdir = "${exec_prefix}/libexec"
65 export libdir = "${exec_prefix}/lib"
66 export includedir = "${exec_prefix}/include"
67 export oldincludedir = "${exec_prefix}/include"
68
69 #
70 # These must match the various bbclass layout definitions
71 #
72 base_bindir_native = "/bin"
73 base_sbindir_native = "/sbin"
74 sysconfdir_native = "/etc"
75 prefix_native = "/usr"
76 bindir_native = "${prefix_native}/bin"
77 sbindir_native = "${prefix_native}/sbin"
78 includedir_native = "${prefix_native}/include"
79 libdir_native = "${prefix_native}/lib"
80 datadir_native = "${prefix_native}/share"
81 bindir_cross = "/bin"
82
83 #
84 # Cross recipes need to know about the target layout
85 # := is used carefully here
86 #
87 target_datadir := "${datadir}"
88
89 ##################################################################
90 # Architecture-dependent build variables.
91 ##################################################################
92
93 BUILD_ARCH = "${@os.uname()[4]}"
94 BUILD_OS = "${@os.uname()[0].lower()}"
95 BUILD_VENDOR = ""
96 BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
97 BUILD_PREFIX = ""
98 BUILD_CC_ARCH = ""
99 BUILD_EXEEXT = ""
100
101 HOST_ARCH = "${TARGET_ARCH}"
102 HOST_OS = "${TARGET_OS}"
103 HOST_VENDOR = "${TARGET_VENDOR}"
104 HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
105 HOST_PREFIX = "${TARGET_PREFIX}"
106 HOST_CC_ARCH = "${TARGET_CC_ARCH}"
107 HOST_EXEEXT = ""
108
109 TARGET_ARCH ?= "INVALID"
110 TARGET_OS = "INVALID"
111 TARGET_VENDOR = "${BUILD_VENDOR}"
112 TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}"
113 TARGET_PREFIX = "${TARGET_SYS}-"
114 TARGET_CC_ARCH = ""
115 TARGET_EXEEXT = ""
116
117 SDK_ARCH ?= "${BUILD_ARCH}"
118 SDK_OS ?= "${BUILD_OS}"
119 SDK_VENDOR ?= "${BUILD_VENDOR}"
120 SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), ''][bb.data.getVar('SDK_OS', d, 1) == ('' or 'custom')]}"
121 SDK_PREFIX = "${SDK_SYS}-"
122 SDK_CC_ARCH ?= "${BUILD_CC_ARCH}"
123 SDK_EXEEXT = ""
124
125 # A shortcut for the commonly used value
126 EXEEXT = "${HOST_EXEEXT}"
127
128 BASE_PACKAGE_ARCH = "${HOST_ARCH}"
129 PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
130 PACKAGE_EXTRA_ARCHS ?= ""
131 MACHINE_ARCH = "${@[bb.data.getVar('BASE_PACKAGE_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))]}"
132 PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}"
133
134 MULTIMACH_ARCH = "${PACKAGE_ARCH}"
135 MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
136 MULTIMACH_HOST_SYS = "${MULTIMACH_ARCH}${HOST_VENDOR}-${HOST_OS}"
137 BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
138 BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
139
140 # select proper CPU to get binary locales generated
141 QEMU_OPTIONS = ""
142 QEMU_OPTIONS_iwmmxt  = "-cpu pxa270-c5"
143 QEMU_OPTIONS_armv6   = "-cpu arm1136"
144 QEMU_OPTIONS_armv6-novfp = "-cpu arm1136"
145 QEMU_OPTIONS_armv7a   = "-cpu cortex-a8"
146
147 ##################################################################
148 # Date/time variables.
149 ##################################################################
150
151 DATE := "${@time.strftime('%Y%m%d',time.gmtime())}"
152 TIME := "${@time.strftime('%H%M%S',time.gmtime())}"
153 DATETIME = "${DATE}${TIME}"
154
155 ##################################################################
156 # Openembedded Software Prerequisites.
157 ##################################################################
158
159 # python-native should be here but python relies on building 
160 # its own in staging
161 ASSUME_PROVIDED = "\
162     bc-native \
163     bzip2-native \
164     cvs-native \
165     diffstat-native \
166     patch-native \
167     perl-native-runtime \
168     python-native-runtime \
169     svn-native \
170     texinfo-native \
171     util-linux-native \
172     "
173
174 ##################################################################
175 # Package default variables.
176 ##################################################################
177 PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}"
178 PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}"
179 PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}"
180 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
181 EXTENDPE = "${@['','${PE\x7d_'][bb.data.getVar('PE',d,1) > 0]}"
182 EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
183 EXTENDPV = "${EXTENDPEVER}${PV}-${PR}${DISTRO_PR}"
184 P = "${PN}-${PV}"
185
186 # Define a PR for kernels that machines can override so things like
187 # modules get rebuilt
188 MACHINE_KERNEL_PR = ""
189
190 # Base package name
191 # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
192 # otherwise it is the same as PN and P
193 SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian -sdk"
194 BPN = "${@base_prune_suffix(bb.data.getVar('PN', d, True), bb.data.getVar('SPECIAL_PKGSUFFIX', d, True).split(), d)}"
195 BP = "${BPN}-${PV}"
196
197 # Package info.
198
199 SECTION = "base"
200 PRIORITY = "optional"
201 DESCRIPTION = "Version ${PV}-${PR} of package ${PN}"
202 LICENSE = "unknown"
203 MAINTAINER = "OpenEmbedded Team <openembedded-devel@lists.openembedded.org>"
204 HOMEPAGE = "unknown"
205
206 # Package dependencies and provides.
207
208 # Ensure that -dev packages recommend the corresponding -dev packages of their
209 # deps, and the same for -dbg.
210 DEPCHAIN_PRE  = ""
211 DEPCHAIN_POST = "-dev -dbg"
212
213 DEPENDS = ""
214 RDEPENDS = ""
215 PROVIDES = ""
216 PROVIDES_prepend = "${P} ${PF} ${PN} "
217 RPROVIDES = ""
218
219 MULTI_PROVIDER_WHITELIST = "virtual/libintl"
220
221 SOLIBS = ".so.*"
222 SOLIBS_darwin = ".*.dylib"
223 SOLIBS_darwin8 = ".*.dylib"
224 SOLIBS_darwin9 = ".*.dylib"
225
226 SOLIBSDEV = ".so"
227 SOLIBSDEV_darwin = ".dylib"
228 SOLIBSDEV_darwin8 = ".dylib"
229 SOLIBSDEV_darwin9 = ".dylib"
230
231 PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-static ${PN}-locale"
232 #enable this when bitbake is upgraded to cope with ++ values in the field
233 PACKAGES_DYNAMIC = "${PN}-locale-*"
234 FILES = ""
235
236 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
237             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
238             ${base_bindir}/* ${base_sbindir}/* \
239             ${base_libdir}/*${SOLIBS} \
240             ${datadir}/${PN} ${libdir}/${PN}/* \
241             ${datadir}/pixmaps ${datadir}/applications \
242             ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
243             ${libdir}/bonobo/servers"
244
245 FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
246             ${datadir}/gnome/help"
247 SECTION_${PN}-doc = "doc"
248
249 FILES_${PN}-static = "${libdir}/*.a ${base_libdir}/*.a"
250
251 FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
252                 ${libdir}/*.o ${libdir}/pkgconfig \
253                 ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig"
254 SECTION_${PN}-dev = "devel"
255 ALLOW_EMPTY_${PN}-dev = "1"
256 RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"
257
258 FILES_${PN}-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
259             ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
260             ${libdir}/matchbox-panel/.debug"
261 SECTION_${PN}-dbg = "devel"
262 ALLOW_EMPTY_${PN}-dbg = "1"
263 RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
264
265 FILES_${PN}-locale = "${datadir}/locale"
266
267 # File manifest
268
269 export MANIFEST = "${FILESDIR}/manifest"
270
271 # file:// search paths
272 FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
273 FILESPATHBASE = "${FILE_DIRNAME}"
274 FILESPATHPKG = "${PF}:${P}:${PN}:${BP}:${BPN}:files:."
275 FILESPATH = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', 1).split(':') for p in d.getVar('FILESPATHPKG', 1).split(':') for o in (d.getVar('OVERRIDES', 1) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}"
276 FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}"
277
278 ##################################################################
279 # General work and output directories for the build system.
280 ##################################################################
281
282 TMPDIR = "${TOPDIR}/tmp"
283 CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}"
284 CO_DIR = "${DL_DIR}"
285 CVSDIR = "${CO_DIR}/cvs"
286 SVNDIR = "${CO_DIR}/svn"
287 GITDIR = "${CO_DIR}/git"
288 BZRDIR = "${CO_DIR}/bzr"
289 HGDIR = "${CO_DIR}/hg"
290
291 STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}"
292 WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}"
293 T = "${WORKDIR}/temp"
294 D = "${WORKDIR}/image"
295 S = "${WORKDIR}/${BP}"
296 B = "${S}"
297
298 STAGING_DIR = "${TMPDIR}/staging"
299
300 STAGING_DIR_JAVA = "${STAGING_DIR}/java"
301 STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
302 STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}"
303 STAGING_BINDIR_CROSS  = "${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"
304 STAGING_BINDIR_CROSS_BASEPKG = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_TARGET_SYS}"
305 STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
306 STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
307 STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
308 STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"
309
310 # This should really be MULTIMACH_HOST_SYS but that breaks "all" and machine 
311 # specific packages - hack around it for now.
312 STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
313 STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
314 STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}"
315 STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"
316 STAGING_DATADIR = "${STAGING_DIR_HOST}${datadir}"
317 STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}"
318 STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
319 STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
320 STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"
321
322 # This should really be MULTIMACH_TARGET_SYS but that breaks "all" and machine 
323 # specific packages - hack around it for now.
324 STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
325
326 STAGING_DIR_SDK = "${STAGING_DIR}/${SDK_SYS}"
327
328 # Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using
329 # packaged staging and/or multimachine.
330 DEPLOY_DIR ?= "${TMPDIR}/deploy"
331 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
332 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
333 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
334 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
335 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
336 DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
337
338 PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
339
340 SDK_NAME = "${DISTRO}/${TARGET_ARCH}"
341 SDK_PATH = "/usr/local/${SDK_NAME}"
342 SDKPATH = "${SDK_PATH}"
343
344 ##################################################################
345 # Kernel info.
346 ##################################################################
347
348 STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/kernel"
349
350 ##################################################################
351 # Specific image creation and rootfs population info.
352 ##################################################################
353
354 IMAGE_ROOTFS = "${TMPDIR}/rootfs/${PN}"
355 IMAGE_BASENAME = "${PN}"
356 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
357 IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
358 IMAGE_EXTRA_SPACE = 10240
359
360 UBI_VOLNAME ?= "${MACHINE}-rootfs"
361
362 IMAGE_CMD = ""
363 IMAGE_CMD_jffs2 = "mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
364 IMAGE_CMD_yaffs2 = "mkyaffs2image ${EXTRA_IMAGECMD} ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2"
365 IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
366 IMAGE_CMD_ext2 = "genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}"
367 IMAGE_CMD_ext2.gz = "install -d ${DEPLOY_DIR_IMAGE}/tmp.gz ; genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}; gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2; mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz"
368 IMAGE_CMD_ext3 = "genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 ${EXTRA_IMAGECMD}; tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3"
369 IMAGE_CMD_ext3.gz = "install -d ${DEPLOY_DIR_IMAGE}/tmp.gz ; genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3 ${EXTRA_IMAGECMD}; tune2fs -j ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3; gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3; mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.gz"
370 IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
371 IMAGE_CMD_squashfs-lzma = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend -comp lzma"
372 IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
373 IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
374 IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
375 IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}"
376 IMAGE_CMD_cpio.gz = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}"
377 IMAGE_CMD_cpio.lzma = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | lzma -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}"
378 IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg"
379 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
380
381 EXTRA_IMAGECMD = ""
382 EXTRA_IMAGECMD_jffs2 = ""
383 EXTRA_IMAGECMD_yaffs2 = "1"
384 EXTRA_IMAGECMD_squashfs = ""
385 EXTRA_IMAGECMD_squashfs-lzma = ""
386 EXTRA_IMAGECMD_cpio = ""
387 EXTRA_IMAGECMD_cpio.gz = ""
388 EXTRA_IMAGECMD_cpio.lzma = ""
389 EXTRA_IMAGECMD_ubi = ""
390 EXTRA_IMAGECMD_ubifs = ""
391
392 IMAGE_DEPENDS = ""
393 IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
394 IMAGE_DEPENDS_yaffs2 = "yaffs2-utils-native"
395 IMAGE_DEPENDS_cramfs = "cramfs-native"
396 IMAGE_DEPENDS_ext2 = "genext2fs-native"
397 IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
398 IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
399 IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
400 IMAGE_DEPENDS_cpio.lzma = "lzma-native"
401 IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
402 IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
403 IMAGE_DEPENDS_ubi = "mtd-utils-native"
404 IMAGE_DEPENDS_ubifs = "mtd-utils-native"
405
406 EXTRA_IMAGEDEPENDS = ""
407
408 ##################################################################
409 # Toolchain info.
410 ##################################################################
411
412 CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}"
413 CROSS_DATADIR = "${CROSS_DIR}/share"
414 PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_BINDIR_CROSS_BASEPKG}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/${bindir_cross}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:"
415 export PATH
416
417 ##################################################################
418 # Build utility info.
419 ##################################################################
420
421 CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}"
422 TOOLCHAIN_OPTIONS = ""
423 TOOLCHAIN_PATH ?= ""
424 TOOLCHAIN_SYSPATH ?= ""
425
426 export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
427 export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
428 export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
429 export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS}"
430 export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS}"
431 export CCLD = "${CC}"
432 export AR = "${HOST_PREFIX}ar"
433 export AS = "${HOST_PREFIX}as"
434 export RANLIB = "${HOST_PREFIX}ranlib"
435 export STRIP = "${HOST_PREFIX}strip"
436 export OBJCOPY = "${HOST_PREFIX}objcopy"
437 export OBJDUMP = "${HOST_PREFIX}objdump"
438 export NM = "${HOST_PREFIX}nm"
439 PYTHON = "${@sys.executable}"
440
441 export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
442 export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
443 export BUILD_F77 = "${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}"
444 export BUILD_CPP = "${BUILD_PREFIX}cpp"
445 export BUILD_LD = "${BUILD_PREFIX}ld"
446 export BUILD_CCLD = "${BUILD_PREFIX}gcc"
447 export BUILD_AR = "${BUILD_PREFIX}ar"
448 export BUILD_RANLIB = "${BUILD_PREFIX}ranlib"
449 export BUILD_STRIP = "${BUILD_PREFIX}strip"
450
451 export MAKE = "make"
452 EXTRA_OEMAKE = "-e MAKEFLAGS="
453
454 ##################################################################
455 # Patch handling.
456 ##################################################################
457 PATCHTOOL = 'quilt'
458 PATCHRESOLVE = 'noop'
459
460 ##################################################################
461 # Build flags and options.
462 ##################################################################
463
464 export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
465 export CPPFLAGS = "${TARGET_CPPFLAGS}"
466 export TARGET_CPPFLAGS = "-isystem${STAGING_DIR_TARGET}${includedir}"
467 export SDK_CPPFLAGS = "-isystem${STAGING_DIR_SDK}${includedir} -isystem${STAGING_DIR_HOST}${includedir}"
468
469 export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
470 export CFLAGS = "${TARGET_CFLAGS}"
471 export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
472 export SDK_CFLAGS = "${SDK_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
473
474 export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive"
475 export CXXFLAGS = "${TARGET_CXXFLAGS}"
476 export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive"
477 export SDK_CXXFLAGS = "${SDK_CFLAGS} -fpermissive"
478
479 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
480                         -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \
481                         -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-O1"
482
483 export LDFLAGS = "${TARGET_LDFLAGS}"
484 export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \
485                          -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir} \
486                          -Wl,-O1 \
487                          ${TARGET_LINK_HASH_STYLE}"
488 export SDK_LDFLAGS = "-L${STAGING_DIR_SDK}${libdir} \
489                          -Wl,-rpath-link,${STAGING_DIR_SDK}${libdir} \
490                          -Wl,-O1"
491
492 # Which flags to leave by strip-flags() in bin/build/oebuild.sh ?
493 ALLOWED_FLAGS = "-O -mcpu -march -pipe"
494
495 # Pass parallel make options to the compile task only
496 EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} "
497 EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
498
499 ##################################################################
500 # Optimization flags.
501 ##################################################################
502
503 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
504 DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
505 SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
506 BUILD_OPTIMIZATION = "-O2 -g"
507
508 ##################################################################
509 # Bootstrap stuff.
510 ##################################################################
511
512 BOOTSTRAP_EXTRA_RDEPENDS = ""
513 BOOTSTRAP_EXTRA_RRECOMMENDS = ""
514
515 ##################################################################
516 # Palmtop stuff.
517 ##################################################################
518
519 export QTDIR = "${STAGING_DIR_HOST}/qt2"
520 export QPEDIR = "${STAGING_DIR_HOST}"
521 export OPIEDIR = "${STAGING_DIR_HOST}"
522 export palmtopdir = "${libdir}/opie"
523 export palmqtdir = "${palmtopdir}"
524
525 ##################################################################
526 # Download locations and utilities.
527 ##################################################################
528
529 OE_STRICT_CHECKSUMS ?= "1"
530
531 ADOBE_MIRROR = "http://fpdownload.macromedia.com/get/flashplayer/current/"
532 APACHE_MIRROR = "http://www.apache.org/dist"
533 DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
534 E_CVS = "cvs://anonymous@anoncvs.enlightenment.org/var/cvs/e" 
535 E_URI = "http://enlightenment.freedesktop.org/files"
536 FREEBSD_MIRROR = "ftp://ftp.freebsd.org/pub/FreeBSD/"
537 FREEDESKTOP_CVS = "cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs"
538 FREESMARTPHONE_GIT = "git://git.freesmartphone.org"
539 GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
540 GNOME_GIT = "git://git.gnome.org"
541 GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
542 GNU_MIRROR = "ftp://ftp.gnu.org/gnu"
543 GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
544 GPE_EXTRA_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=${PN}"
545 GPE_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=${PN}"
546 GPEPHONE_MIRROR = "http://gpephone.linuxtogo.org/download/gpephone"
547 GPEPHONE_SVN = "svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=${PN}"
548 HANDHELDS_CVS = "cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs"
549 KERNELORG_MIRROR = "http://kernel.org"
550 SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"
551 XLIBS_MIRROR = "http://xlibs.freedesktop.org/release"
552 XORG_MIRROR = "http://xorg.freedesktop.org/releases"
553
554 # You can use the mirror of your country to get faster downloads by putting
555 #  export DEBIAN_MIRROR = "ftp://ftp.de.debian.org/debian/pool"
556 #     into your local.conf
557
558 FETCHCMD_svn = "/usr/bin/env svn"
559 FETCHCMD_cvs = "/usr/bin/env cvs"
560 FETCHCMD_wget = "/usr/bin/env wget -t 5 --no-check-certificate"
561 FETCHCMD_bzr = "/usr/bin/env bzr"
562 FETCHCMD_hg = "/usr/bin/env hg"
563
564 FETCHCOMMAND = "ERROR, this must be a BitBake bug"
565 FETCHCOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} ${URI}"
566 FETCHCOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
567 FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
568 RESUMECOMMAND = "ERROR, this must be a BitBake bug"
569 RESUMECOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -c -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} ${URI}"
570 UPDATECOMMAND = "ERROR, this must be a BitBake bug"
571 UPDATECOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
572 UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
573 SRCDATE = "${DATE}"
574 SRCREV = "1"
575 SRCPV = "${@bb.fetch.get_srcrev(d)}"
576 AUTOREV = "${SRCPV}"
577
578 SRC_URI = "file://${FILE}"
579
580 ##################################################################
581 # UI/Interaction Configuration
582 ##################################################################
583
584 SHELLRCCMD = "bash --rcfile $TERMRCFILE"
585 export SHELLCMDS = "${SHELLRCCMD}"
586 # Some common terminal programs to choose from
587 GNOME_TERMCMD = 'gnome-terminal --disable-factory -t "$TERMWINDOWTITLE"'
588 GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x $SHELLCMDS'
589 SCREEN_TERMCMD = 'screen -D -m -t "$TERMWINDOWTITLE"'
590 SCREEN_TERMCMDRUN = '${SCREEN_TERMCMD} $SHELLCMDS'
591 XTERM_TERMCMD = 'xterm -T "$TERMWINDOWTITLE"'
592 XTERM_TERMCMDRUN = '${XTERM_TERMCMD} -e $SHELLCMDS'
593 KONSOLE_TERMCMD = 'konsole -T "$TERMWINDOWTITLE"'
594 KONSOLE_TERMCMDRUN = '${KONSOLE_TERMCMD} -e $SHELLCMDS'
595
596 # Set a default
597 TERMCMD ?= "${GNOME_TERMCMD}"
598 TERMCMDRUN ?= "${GNOME_TERMCMDRUN}"
599
600 ##################################################################
601 # Miscellaneous utilities.
602 ##################################################################
603
604 MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
605 MKTEMPCMD = "mktemp -q ${TMPBASE}"
606
607 # GNU patch tries to be intellgent about checking out read-only files from
608 # a RCS, which freaks out those special folks with active Perforce clients
609 # the following makes patch ignore RCS:
610
611 export PATCH_GET="0"
612
613 # Program to be used to build ipkg packages
614
615 IPKGBUILDCMD = "ipkg-build -o 0 -g 0"
616
617 ##################################################################
618 # Not sure about the rest of this yet.
619 ##################################################################
620
621 # slot - currently unused by OE. portage remnants
622 SLOT = "0"
623
624 # Other
625
626 export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
627 export PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
628 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
629 export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
630
631 export XDG_DATA_DIRS = "${STAGING_DATADIR}"
632
633 export QMAKE_MKSPEC_PATH = "${STAGING_DATADIR_NATIVE}/qmake"
634 export STAGING_SIPDIR = "${STAGING_DATADIR_NATIVE}/sip"
635 export STAGING_IDLDIR = "${STAGING_DATADIR}/idl"
636
637 # library package naming
638 AUTO_LIBNAME_PKGS = "${PACKAGES}"
639
640 # Globally toggle certain dependencies
641 ENTERPRISE_DISTRO ?= "0"
642
643 # Pre-build configuration output
644
645 BUILDCFG_HEADER = "Build Configuration:"
646 BUILDCFG_VARS ?= "BB_VERSION METADATA_BRANCH METADATA_REVISION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION"
647 BUILDCFG_VARS_append_arm = " TARGET_FPU"
648 BUILDCFG_VARS_append_armeb = " TARGET_FPU"
649 BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS"
650
651 ###
652 ### Config file processing
653 ###
654
655 # Overrides are processed left to right, so the ones that are named later take precedence.
656 # You generally want them to go from least to most specific.
657
658 # This means that an envionment variable named '<foo>_arm' overrides an
659 # environment variable '<foo>' (when ${TARGET_ARCH} is arm).
660 # an environment variable '<foo>_ramses' overrides '<foo>' but doesn't override
661 # '<foo>_arm' when ${MACHINE} is 'ramses'. 
662 # If you use combination ie '<foo>_arm_ramses', then '<foo>_arm_ramses' will override 
663 # '<foo>_arm' and then '<foo>' will be overriden with that value from '<foo>_arm'.
664 # And finally '<foo>_local' overrides anything, but with lowest priority.
665 #
666 # This works for  functions as well, they are really just environment variables.
667 # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
668 OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
669 # Alternative OVERRIDES definition without "fail fast", usually only for native building and Scratchbox toolchains.
670 #OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}"
671
672 ##################################################################
673 # Include the rest of the config files.
674 ##################################################################
675
676 require conf/collections.inc
677 include conf/site.conf
678 include conf/auto.conf
679 include conf/local.conf
680 # USERDISTRO should always contain original DISTRO value as set by user
681 # If a distro config overrides DISTRO for whatever reason (e.g. to get
682 # overrides like it wants), USERDISTRO must be reassigned with := first
683 USERDISTRO = "${DISTRO}"
684 include conf/build/${BUILD_SYS}.conf
685 include conf/target/${TARGET_SYS}.conf
686 include conf/machine/${MACHINE}.conf
687 include conf/distro/${DISTRO}.conf
688 include conf/documentation.conf
689 require conf/sanity.conf
690 require conf/abi_version.conf
691 require conf/enterprise.conf
692 require conf/compatibility-providers.conf
693
694 ##################################################################
695 # Weak variables (usually to retain backwards compatibility)
696 ##################################################################
697
698 DL_DIR ?= "${TMPDIR}/downloads"
699 IMAGE_FSTYPES ?= "tar.gz"
700 PCMCIA_MANAGER ?= "pcmcia-cs"
701 DEFAULT_TASK_PROVIDER ?= "task-base"
702 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
703 IMAGE_ROOTFS_SIZE ?= "65536"
704 IMAGE_ROOTFS_SIZE_ext2 ?= "65536"
705 IMAGE_ROOTFS_SIZE_ext2.gz ?= "65536"
706 IMAGE_ROOTFS_SIZE_ext3 ?= "65536"
707 IMAGE_ROOTFS_SIZE_ext3.gz ?= "65536"
708 DISTRO_PR ?= ""
709
710 # Forcefully set CACHE now so future changes to things like 
711 # MACHINE don't change the path to the cache
712 CACHE := "${CACHE}"
713
714 # Default to disabling packaged staging code
715 export PSTAGING_ACTIVE = "0"
716
717 ##################################################################
718 # Magic Cookie for SANITY CHECK
719 ##################################################################
720 OES_BITBAKE_CONF = "1"
721
722 ##################################################################
723 # Machine properties and task-base stuff
724 ##################################################################
725
726 MACHINE_FEATURES ?= "kernel26"
727 DISTRO_FEATURES ?= ""
728
729 # This is used to limit what packages goes into images built, so set big by default
730 ROOT_FLASH_SIZE ?= "256"
731
732 MACHINE_GUI_CLASS ?= "smallscreen"
733 # GUI_MACHINE_CLASS is deprecated, please use MACHINE_GUI_CLASS instead
734 GUI_MACHINE_CLASS ?= "${MACHINE_GUI_CLASS}"
735 MACHINE_DISPLAY_WIDTH_PIXELS ?= "240"
736 MACHINE_DISPLAY_HEIGHT_PIXELS ?= "320"
737 MACHINE_DISPLAY_ORIENTATION ?= "0"
738 MACHINE_DISPLAY_BPP ?= "16"
739
740 DISTRO_EXTRA_RDEPENDS ?= ""
741 DISTRO_EXTRA_RRECOMMENDS ?= ""
742 MACHINE_EXTRA_RDEPENDS ?= ""
743 MACHINE_EXTRA_RRECOMMENDS ?= ""
744 MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
745 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
746
747 COMBINED_FEATURES = "\
748     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
749     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} \
750     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "ext2", d)} \
751     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "vfat", d)} \
752     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "irda", d)} \
753     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pcmcia", d)} \
754     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pci", d)} \
755     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} \
756     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)} \
757     ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "wifi", d)}"
758
759 # We want madwifi if all of the following are true:
760 # - distro has pci, wifi, and madwifi in its features
761 # - machine has pci in its features
762 COMBINED_FEATURES += "${@base_ifelse( \
763     base_contains('DISTRO_FEATURES', ('pci', 'wifi', 'madwifi'), True, False, d) and \
764     base_contains('MACHINE_FEATURES', 'pci', True, False, d), \
765     'madwifi', '')}"
766
767 # We want hostap if all of the following are true:
768 # - 'wifi' and 'hostap' are in distro features
769 # - either 'pci' or 'pcmcia' are in both distro and machine features
770 COMBINED_FEATURES += "${@base_ifelse( \
771     base_contains('DISTRO_FEATURES', ('wifi', 'hostap'), True, False, d) and \
772     ((base_contains('MACHINE_FEATURES', 'pci', True, False, d) and \
773       base_contains('DISTRO_FEATURES', 'pci', True, False, d)) or \
774      (base_contains('MACHINE_FEATURES', 'pcmcia', True, False, d) and \
775       base_contains('DISTRO_FEATURES', 'pcmcia', True, False, d))), \
776     'hostap', '')}"