1 ##################################################################
3 ##################################################################
4 BBMASK = "/(nonworking|obsolete)/"
6 ##################################################################
7 # Standard target filesystem layout.
8 ##################################################################
11 layout_prefix = "/usr"
12 layout_exec_prefix = "/usr"
13 layout_base_prefix = ""
16 layout_base_bindir = "${layout_base_prefix}/bin"
17 layout_base_sbindir = "${layout_base_prefix}/sbin"
18 layout_base_libdir = "${layout_base_prefix}/lib"
20 # Architecture independent paths
21 layout_sysconfdir = "${layout_base_prefix}/etc"
22 layout_localstatedir = "${layout_base_prefix}/var"
23 layout_servicedir = "${layout_base_prefix}/srv"
24 layout_sharedstatedir = "${layout_prefix}/com"
25 layout_datadir = "${layout_prefix}/share"
26 layout_infodir = "${layout_datadir}/info"
27 layout_mandir = "${layout_datadir}/man"
28 layout_docdir = "${layout_datadir}/doc"
30 # Architecture dependent paths
31 layout_bindir = "${layout_exec_prefix}/bin"
32 layout_sbindir = "${layout_exec_prefix}/sbin"
33 layout_libdir = "${layout_exec_prefix}/lib"
34 layout_includedir = "${layout_exec_prefix}/include"
35 layout_libexecdir = "${layout_exec_prefix}/libexec"
37 ##################################################################
38 # Standard target filesystem paths.
39 ##################################################################
42 export base_prefix = ""
43 export prefix = "${layout_prefix}"
44 export exec_prefix = "${layout_exec_prefix}"
47 export base_bindir = "${layout_base_bindir}"
48 export base_sbindir = "${layout_base_sbindir}"
49 export base_libdir = "${layout_base_libdir}"
51 # Architecture independent paths
52 export datadir = "${layout_datadir}"
53 export sysconfdir = "${layout_sysconfdir}"
54 export sharedstatedir = "${layout_sharedstatedir}"
55 export localstatedir = "${layout_localstatedir}"
56 export infodir = "${layout_infodir}"
57 export mandir = "${layout_mandir}"
58 export docdir = "${layout_docdir}"
59 export servicedir = "${layout_servicedir}"
61 # Architecture dependent paths
62 export bindir = "${layout_bindir}"
63 export sbindir = "${layout_sbindir}"
64 export libexecdir = "${layout_libexecdir}"
65 export libdir = "${layout_libdir}"
66 export includedir = "${layout_includedir}"
67 export oldincludedir = "${layout_includedir}"
69 ##################################################################
70 # Architecture-dependent build variables.
71 ##################################################################
73 BUILD_ARCH = "${@os.uname()[4]}"
74 BUILD_OS = "${@os.uname()[0].lower()}"
76 BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
81 HOST_ARCH = "${TARGET_ARCH}"
82 HOST_OS = "${TARGET_OS}"
83 HOST_VENDOR = "${TARGET_VENDOR}"
84 HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
85 HOST_PREFIX = "${TARGET_PREFIX}"
86 HOST_CC_ARCH = "${TARGET_CC_ARCH}"
89 TARGET_ARCH ?= "INVALID"
91 TARGET_VENDOR = "${BUILD_VENDOR}"
92 TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}"
93 TARGET_PREFIX = "${TARGET_SYS}-"
97 SDK_ARCH ?= "${BUILD_ARCH}"
98 SDK_OS ?= "${BUILD_OS}"
99 SDK_VENDOR ?= "${BUILD_VENDOR}"
100 SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), ''][bb.data.getVar('SDK_OS', d, 1) == ('' or 'custom')]}"
101 SDK_PREFIX = "${SDK_SYS}-"
102 SDK_CC_ARCH ?= "${BUILD_CC_ARCH}"
105 # A shortcut for the commonly used value
106 EXEEXT = "${HOST_EXEEXT}"
108 BASE_PACKAGE_ARCH = "${HOST_ARCH}"
109 PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
110 MACHINE_ARCH = "${@[bb.data.getVar('HOST_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))]}"
111 PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}"
113 MULTIMACH_ARCH = "${PACKAGE_ARCH}"
114 MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
115 MULTIMACH_HOST_SYS = "${MULTIMACH_ARCH}${HOST_VENDOR}-${HOST_OS}"
116 BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
117 BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
119 # select proper CPU to get binary locales generated
121 QEMU_OPTIONS_iwmmxt = "-cpu pxa270-c5"
122 QEMU_OPTIONS_armv6 = "-cpu arm1136"
123 QEMU_OPTIONS_armv6-novfp = ""-cpu arm1136"
124 QEMU_OPTIONS_armv7a = "-cpu cortex-a8"
126 ##################################################################
127 # Date/time variables.
128 ##################################################################
130 DATE := "${@time.strftime('%Y%m%d',time.gmtime())}"
131 TIME := "${@time.strftime('%H%M%S',time.gmtime())}"
132 DATETIME = "${DATE}${TIME}"
134 ##################################################################
135 # Openembedded Software Prerequisites.
136 ##################################################################
138 # python-native should be here but python relies on building
146 perl-native-runtime \
147 python-native-runtime \
153 ##################################################################
154 # Package default variables.
155 ##################################################################
156 PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}"
157 PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0'}"
158 PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}"
159 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
160 EXTENDPE = "${@['','${PE\x7d_'][bb.data.getVar('PE',d,1) > 0]}"
161 EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
162 EXTENDPV = "${EXTENDPEVER}${PV}-${PR}${DISTRO_PR}"
165 # Define a PR for kernels that machines can override so things like
166 # modules get rebuilt
167 MACHINE_KERNEL_PR ?= "r0"
170 # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
171 # otherwise it is the same as PN and P
172 BPN = "${@base_package_name(d)}"
178 PRIORITY = "optional"
179 DESCRIPTION = "Version ${PV}-${PR} of package ${PN}"
181 MAINTAINER = "OpenEmbedded Team <openembedded-devel@lists.openembedded.org>"
184 # Package dependencies and provides.
186 # Ensure that -dev packages recommend the corresponding -dev packages of their
187 # deps, and the same for -dbg.
189 DEPCHAIN_POST = "-dev -dbg"
194 PROVIDES_prepend = "${P} ${PF} ${PN} "
197 MULTI_PROVIDER_WHITELIST = "virtual/libintl"
200 SOLIBS_darwin = ".*.dylib"
201 SOLIBS_darwin8 = ".*.dylib"
202 SOLIBS_darwin9 = ".*.dylib"
205 SOLIBSDEV_darwin = ".dylib"
206 SOLIBSDEV_darwin8 = ".dylib"
207 SOLIBSDEV_darwin9 = ".dylib"
209 PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-locale"
210 #enable this when bitbake is upgraded to cope with ++ values in the field
211 PACKAGES_DYNAMIC = "${PN}-locale-*"
214 # NB: ${base_libdir}/*${SOLIBSDEV} is included here because the shared libraries
215 # in ${base_libdir} do not follow the usual *.so.* naming convention, for instance
217 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
218 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
219 ${base_bindir}/* ${base_sbindir}/* \
220 ${base_libdir}/*${SOLIBS} ${base_libdir}/*${SOLIBSDEV} \
221 ${datadir}/${PN} ${libdir}/${PN}/* \
222 ${datadir}/pixmaps ${datadir}/applications \
223 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
224 ${libdir}/bonobo/servers"
226 FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
227 ${datadir}/gnome/help"
228 SECTION_${PN}-doc = "doc"
230 FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
231 ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \
232 ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig"
233 SECTION_${PN}-dev = "devel"
234 ALLOW_EMPTY_${PN}-dev = "1"
235 RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"
237 FILES_${PN}-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
238 ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
239 ${libdir}/matchbox-panel/.debug"
240 SECTION_${PN}-dbg = "devel"
241 ALLOW_EMPTY_${PN}-dbg = "1"
242 RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
244 FILES_${PN}-locale = "${datadir}/locale"
248 export MANIFEST = "${FILESDIR}/manifest"
250 # file:// search paths
251 FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
252 FILESPATHBASE = "${FILE_DIRNAME}"
253 FILESPATHPKG = "${PF}:${P}:${PN}:${BP}:${BPN}:files:."
254 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))])}"
255 FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}"
257 ##################################################################
258 # General work and output directories for the build system.
259 ##################################################################
261 TMPDIR = "${TOPDIR}/tmp"
262 CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}"
264 CVSDIR = "${CO_DIR}/cvs"
265 SVNDIR = "${CO_DIR}/svn"
266 GITDIR = "${CO_DIR}/git"
267 BZRDIR = "${CO_DIR}/bzr"
268 HGDIR = "${CO_DIR}/hg"
270 STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}"
271 WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}"
272 T = "${WORKDIR}/temp"
273 D = "${WORKDIR}/image"
274 S = "${WORKDIR}/${BP}"
277 STAGING_DIR = "${TMPDIR}/staging"
279 STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
280 STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_bindir}"
281 STAGING_BINDIR_CROSS = "${STAGING_DIR_NATIVE}${layout_bindir}/${MULTIMACH_HOST_SYS}"
282 STAGING_BINDIR_CROSS_BASEPKG = "${STAGING_DIR_NATIVE}${layout_bindir}/${BASEPKG_TARGET_SYS}"
283 STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_libdir}"
284 STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_includedir}"
285 STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_sysconfdir}"
286 STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_datadir}"
288 # This should really be MULTIMACH_HOST_SYS but that breaks "all" and machine
289 # specific packages - hack around it for now.
290 STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
291 STAGING_BINDIR = "${STAGING_DIR_HOST}${layout_bindir}"
292 STAGING_LIBDIR = "${STAGING_DIR_HOST}${layout_libdir}"
293 STAGING_INCDIR = "${STAGING_DIR_HOST}${layout_includedir}"
294 STAGING_DATADIR = "${STAGING_DIR_HOST}${layout_datadir}"
295 STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${layout_exec_prefix}"
296 STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
297 STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
298 STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"
300 # This should really be MULTIMACH_TARGET_SYS but that breaks "all" and machine
301 # specific packages - hack around it for now.
302 STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
304 STAGING_DIR_SDK = "${STAGING_DIR}/${SDK_SYS}"
306 # Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using
307 # packaged staging and/or multimachine.
308 DEPLOY_DIR ?= "${TMPDIR}/deploy"
309 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
310 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
311 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
312 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
313 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
314 DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
316 PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
318 SDK_NAME = "${DISTRO}/${TARGET_ARCH}"
319 SDK_PATH = "/usr/local/${SDK_NAME}"
321 ##################################################################
323 ##################################################################
325 STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/kernel"
327 ##################################################################
328 # Specific image creation and rootfs population info.
329 ##################################################################
331 IMAGE_ROOTFS = "${TMPDIR}/rootfs/${PN}"
332 IMAGE_BASENAME = "${PN}"
333 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
334 IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
335 IMAGE_EXTRA_SPACE = 10240
337 UBI_VOLNAME ?= "${MACHINE}-rootfs"
340 IMAGE_CMD_jffs2 = "mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
341 IMAGE_CMD_yaffs2 = "mkyaffs2image ${EXTRA_IMAGECMD} ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2"
342 IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
343 IMAGE_CMD_ext2 = "genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}"
344 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"
345 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"
346 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"
347 IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
348 IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend"
349 IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
350 IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
351 IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
352 IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}"
353 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}"
354 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"
355 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
358 EXTRA_IMAGECMD_jffs2 = ""
359 EXTRA_IMAGECMD_yaffs2 = "1"
360 EXTRA_IMAGECMD_squashfs = ""
361 EXTRA_IMAGECMD_squashfs-lzma = ""
362 EXTRA_IMAGECMD_cpio = ""
363 EXTRA_IMAGECMD_cpio.gz = ""
364 EXTRA_IMAGECMD_ubi = ""
365 EXTRA_IMAGECMD_ubifs = ""
368 IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
369 IMAGE_DEPENDS_yaffs2 = "yaffs2-utils-native"
370 IMAGE_DEPENDS_cramfs = "cramfs-native"
371 IMAGE_DEPENDS_ext2 = "genext2fs-native"
372 IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
373 IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
374 IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
375 IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
376 IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native"
377 IMAGE_DEPENDS_ubi = "mtd-utils-native"
378 IMAGE_DEPENDS_ubifs = "mtd-utils-native"
380 EXTRA_IMAGEDEPENDS = ""
382 ##################################################################
384 ##################################################################
386 CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}"
387 CROSS_DATADIR = "${CROSS_DIR}/share"
388 PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_BINDIR_CROSS_BASEPKG}:${STAGING_DIR_NATIVE}${layout_sbindir}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/bin:${STAGING_DIR_NATIVE}${layout_base_sbindir}:${STAGING_DIR_NATIVE}${layout_base_bindir}:"
391 ##################################################################
392 # Build utility info.
393 ##################################################################
395 CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}"
396 TOOLCHAIN_OPTIONS = ""
398 export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
399 export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
400 export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
401 export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS}"
402 export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS}"
403 export CCLD = "${CC}"
404 export AR = "${HOST_PREFIX}ar"
405 export AS = "${HOST_PREFIX}as"
406 export RANLIB = "${HOST_PREFIX}ranlib"
407 export STRIP = "${HOST_PREFIX}strip"
408 export OBJCOPY = "${HOST_PREFIX}objcopy"
409 export OBJDUMP = "${HOST_PREFIX}objdump"
410 PYTHON = "${@sys.executable}"
412 export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
413 export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
414 export BUILD_F77 = "${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}"
415 export BUILD_CPP = "${BUILD_PREFIX}cpp"
416 export BUILD_LD = "${BUILD_PREFIX}ld"
417 export BUILD_CCLD = "${BUILD_PREFIX}gcc"
418 export BUILD_AR = "${BUILD_PREFIX}ar"
419 export BUILD_RANLIB = "${BUILD_PREFIX}ranlib"
420 export BUILD_STRIP = "${BUILD_PREFIX}strip"
423 EXTRA_OEMAKE = "-e MAKEFLAGS="
425 ##################################################################
427 ##################################################################
429 PATCHRESOLVE = 'noop'
431 ##################################################################
432 # Build flags and options.
433 ##################################################################
435 export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
436 export CPPFLAGS = "${TARGET_CPPFLAGS}"
437 export TARGET_CPPFLAGS = "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
438 export SDK_CPPFLAGS = "-isystem${STAGING_DIR_SDK}${layout_includedir} -isystem${STAGING_DIR_HOST}${layout_includedir}"
440 export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
441 export CFLAGS = "${TARGET_CFLAGS}"
442 export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
443 export SDK_CFLAGS = "${SDK_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
445 export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive"
446 export CXXFLAGS = "${TARGET_CXXFLAGS}"
447 export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive"
448 export SDK_CXXFLAGS = "${SDK_CFLAGS} -fpermissive"
450 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
451 -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \
452 -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-O1"
454 export LDFLAGS = "${TARGET_LDFLAGS}"
455 export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${layout_libdir} \
456 -Wl,-rpath-link,${STAGING_DIR_TARGET}${layout_libdir} \
458 ${TARGET_LINK_HASH_STYLE}"
459 export SDK_LDFLAGS = "-L${STAGING_DIR_SDK}${layout_libdir} \
460 -Wl,-rpath-link,${STAGING_DIR_SDK}${layout_libdir} \
463 # Which flags to leave by strip-flags() in bin/build/oebuild.sh ?
464 ALLOWED_FLAGS = "-O -mcpu -march -pipe"
466 # Pass parallel make options to the compile task only
467 EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} "
468 EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
470 ##################################################################
471 # Optimization flags.
472 ##################################################################
474 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
475 DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
476 SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
477 BUILD_OPTIMIZATION = "-O2"
479 ##################################################################
481 ##################################################################
483 BOOTSTRAP_EXTRA_RDEPENDS = ""
484 BOOTSTRAP_EXTRA_RRECOMMENDS = ""
486 ##################################################################
488 ##################################################################
490 export QTDIR = "${STAGING_DIR_HOST}/qt2"
491 export QPEDIR = "${STAGING_DIR_HOST}"
492 export OPIEDIR = "${STAGING_DIR_HOST}"
493 export palmtopdir = "${libdir}/opie"
494 export palmqtdir = "${palmtopdir}"
496 ##################################################################
497 # Download locations and utilities.
498 ##################################################################
500 OE_STRICT_CHECKSUMS ?= "1"
502 ADOBE_MIRROR = "http://fpdownload.macromedia.com/get/flashplayer/current/"
503 APACHE_MIRROR = "http://www.apache.org/dist"
504 DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
505 E_CVS = "cvs://anonymous@anoncvs.enlightenment.org/var/cvs/e"
506 E_URI = "http://enlightenment.freedesktop.org/files"
507 FREEBSD_MIRROR = "ftp://ftp.freebsd.org/pub/FreeBSD/"
508 FREEDESKTOP_CVS = "cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs"
509 FREESMARTPHONE_GIT = "git://git.freesmartphone.org"
510 GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
511 GNOME_GIT = "git://git.gnome.org"
512 GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
513 GNU_MIRROR = "ftp://ftp.gnu.org/gnu"
514 GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
515 GPE_EXTRA_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=${PN}"
516 GPE_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=${PN}"
517 GPEPHONE_MIRROR = "http://gpephone.linuxtogo.org/download/gpephone"
518 GPEPHONE_SVN = "svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=${PN}"
519 HANDHELDS_CVS = "cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs"
520 KERNELORG_MIRROR = "http://kernel.org"
521 SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"
522 XLIBS_MIRROR = "http://xlibs.freedesktop.org/release"
523 XORG_MIRROR = "http://xorg.freedesktop.org/releases"
525 # You can use the mirror of your country to get faster downloads by putting
526 # export DEBIAN_MIRROR = "ftp://ftp.de.debian.org/debian/pool"
527 # into your local.conf
529 FETCHCMD_svn = "/usr/bin/env svn"
530 FETCHCMD_cvs = "/usr/bin/env cvs"
531 FETCHCMD_wget = "/usr/bin/env wget -t 5 --no-check-certificate"
532 FETCHCMD_bzr = "/usr/bin/env bzr"
533 FETCHCMD_hg = "/usr/bin/env hg"
535 FETCHCOMMAND = "ERROR, this must be a BitBake bug"
536 FETCHCOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} ${URI}"
537 FETCHCOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
538 FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
539 RESUMECOMMAND = "ERROR, this must be a BitBake bug"
540 RESUMECOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -c -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} ${URI}"
541 UPDATECOMMAND = "ERROR, this must be a BitBake bug"
542 UPDATECOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
543 UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
546 AUTOREV = "${@bb.fetch.get_srcrev(d)}"
548 SRC_URI = "file://${FILE}"
550 ##################################################################
551 # UI/Interaction Configuration
552 ##################################################################
554 SHELLRCCMD = "bash --rcfile $TERMRCFILE"
555 export SHELLCMDS = "${SHELLRCCMD}"
556 # Some common terminal programs to choose from
557 GNOME_TERMCMD = 'gnome-terminal --disable-factory -t "$TERMWINDOWTITLE"'
558 GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x $SHELLCMDS'
559 SCREEN_TERMCMD = 'screen -D -m -t "$TERMWINDOWTITLE"'
560 SCREEN_TERMCMDRUN = '${SCREEN_TERMCMD} $SHELLCMDS'
561 XTERM_TERMCMD = 'xterm -T "$TERMWINDOWTITLE"'
562 XTERM_TERMCMDRUN = '${XTERM_TERMCMD} -e $SHELLCMDS'
563 KONSOLE_TERMCMD = 'konsole -T "$TERMWINDOWTITLE"'
564 KONSOLE_TERMCMDRUN = '${KONSOLE_TERMCMD} -e $SHELLCMDS'
567 TERMCMD ?= "${GNOME_TERMCMD}"
568 TERMCMDRUN ?= "${GNOME_TERMCMDRUN}"
570 ##################################################################
571 # Miscellaneous utilities.
572 ##################################################################
574 MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
575 MKTEMPCMD = "mktemp -q ${TMPBASE}"
577 # GNU patch tries to be intellgent about checking out read-only files from
578 # a RCS, which freaks out those special folks with active Perforce clients
579 # the following makes patch ignore RCS:
583 # Program to be used to build ipkg packages
585 IPKGBUILDCMD = "ipkg-build -o 0 -g 0"
587 ##################################################################
588 # Not sure about the rest of this yet.
589 ##################################################################
591 # slot - currently unused by OE. portage remnants
596 export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${layout_libdir}/pkgconfig"
597 export PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
598 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
599 export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
601 export XDG_DATA_DIRS = "${STAGING_DATADIR}"
603 export QMAKE_MKSPEC_PATH = "${STAGING_DATADIR_NATIVE}/qmake"
604 export STAGING_SIPDIR = "${STAGING_DATADIR_NATIVE}/sip"
605 export STAGING_IDLDIR = "${STAGING_DATADIR}/idl"
607 # library package naming
608 AUTO_LIBNAME_PKGS = "${PACKAGES}"
610 # Globally toggle certain dependencies
611 ENTERPRISE_DISTRO ?= "0"
613 # Pre-build configuration output
614 BUILDCFG_VARS ?= "BB_VERSION METADATA_BRANCH METADATA_REVISION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION"
615 BUILDCFG_VARS_append_arm = " TARGET_FPU"
616 BUILDCFG_VARS_append_armeb = " TARGET_FPU"
617 BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS"
620 ### Config file processing
623 # This means that an envionment variable named '<foo>_arm' overrides an
624 # environment variable '<foo>' (when ${TARGET_ARCH} is arm). And the same: an
625 # environment variable '<foo>_ramses' overrides both '<foo>' and '<foo>_arm
626 # when ${MACHINE} is 'ramses'. And finally '<foo>_local' overrides anything.
628 # This works for functions as well, they are really just environment variables.
629 # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
630 OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
631 # Alternative OVERRIDES definition without "fail fast", usually only for native building and Scratchbox toolchains.
632 #OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}"
634 ##################################################################
635 # Include the rest of the config files.
636 ##################################################################
638 require conf/collections.inc
639 include conf/site.conf
640 include conf/auto.conf
641 include conf/local.conf
642 # USERDISTRO should always contain original DISTRO value as set by user
643 # If a distro config overrides DISTRO for whatever reason (e.g. to get
644 # overrides like it wants), USERDISTRO must be reassigned with := first
645 USERDISTRO = "${DISTRO}"
646 include conf/build/${BUILD_SYS}.conf
647 include conf/target/${TARGET_SYS}.conf
648 include conf/machine/${MACHINE}.conf
649 include conf/distro/${DISTRO}.conf
650 include conf/documentation.conf
651 require conf/sanity.conf
652 require conf/abi_version.conf
653 require conf/enterprise.conf
655 ##################################################################
656 # Weak variables (usually to retain backwards compatibility)
657 ##################################################################
659 OLDEST_KERNEL ?= "2.4.0"
661 DL_DIR ?= "${TMPDIR}/downloads"
662 IMAGE_FSTYPES ?= "tar.gz"
663 PCMCIA_MANAGER ?= "pcmcia-cs"
664 DEFAULT_TASK_PROVIDER ?= "task-base"
665 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
666 IMAGE_ROOTFS_SIZE ?= "65536"
667 IMAGE_ROOTFS_SIZE_ext2 ?= "65536"
668 IMAGE_ROOTFS_SIZE_ext2.gz ?= "65536"
669 IMAGE_ROOTFS_SIZE_ext3 ?= "65536"
670 IMAGE_ROOTFS_SIZE_ext3.gz ?= "65536"
673 # Forcefully set CACHE now so future changes to things like
674 # MACHINE don't change the path to the cache
677 # Default to disabling packaged staging code
678 export PSTAGING_ACTIVE = "0"
680 ##################################################################
681 # Magic Cookie for SANITY CHECK
682 ##################################################################
683 OES_BITBAKE_CONF = "1"
685 ##################################################################
686 # Machine properties and task-base stuff
687 ##################################################################
689 MACHINE_FEATURES ?= "kernel26"
690 DISTRO_FEATURES ?= ""
692 # This is used to limit what packages goes into images built, so set big by default
693 ROOT_FLASH_SIZE ?= "256"
695 MACHINE_GUI_CLASS ?= "smallscreen"
696 # GUI_MACHINE_CLASS is deprecated, please use MACHINE_GUI_CLASS instead
697 GUI_MACHINE_CLASS ?= "${MACHINE_GUI_CLASS}"
698 MACHINE_DISPLAY_WIDTH_PIXELS ?= "240"
699 MACHINE_DISPLAY_HEIGHT_PIXELS ?= "320"
700 MACHINE_DISPLAY_ORIENTATION ?= "0"
701 MACHINE_DISPLAY_BPP ?= "16"
703 DISTRO_EXTRA_RDEPENDS ?= ""
704 DISTRO_EXTRA_RRECOMMENDS ?= ""
705 MACHINE_EXTRA_RDEPENDS ?= ""
706 MACHINE_EXTRA_RRECOMMENDS ?= ""
707 MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
708 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
710 COMBINED_FEATURES = "\
711 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
712 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} \
713 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "ext2", d)} \
714 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "vfat", d)} \
715 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "irda", d)} \
716 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pcmcia", d)} \
717 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pci", d)} \
718 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} \
719 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)} \
720 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "wifi", d)}"