1 ##################################################################
3 ##################################################################
4 BBMASK = "/(nonworking|obsolete)/"
6 ##################################################################
7 # Standard target filesystem layout.
8 ##################################################################
11 layout_prefix = "${prefix}"
12 layout_exec_prefix = "${exec_prefix}"
13 layout_base_prefix = "${base_prefix}"
16 layout_base_bindir = "${base_bindir}"
17 layout_base_sbindir = "${base_sbindir}"
18 layout_base_libdir = "${base_libdir}"
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}"
30 # Architecture dependent paths
31 layout_bindir = "${bindir}"
32 layout_sbindir = "${sbindir}"
33 layout_libdir = "${libdir}"
34 layout_includedir = "${includedir}"
35 layout_libexecdir = "${libexecdir}"
37 ##################################################################
38 # Standard target filesystem paths.
39 ##################################################################
42 export base_prefix = ""
43 export prefix = "/usr"
44 export exec_prefix = "/usr"
47 export base_bindir = "${base_prefix}/bin"
48 export base_sbindir = "${base_prefix}/sbin"
49 export base_libdir = "${base_prefix}/lib"
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"
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"
70 # These must match the various bbclass layout definitions
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"
84 # Cross recipes need to know about the target layout
85 # := is used carefully here
87 target_datadir := "${datadir}"
89 ##################################################################
90 # Architecture-dependent build variables.
91 ##################################################################
93 BUILD_ARCH = "${@os.uname()[4]}"
94 BUILD_OS = "${@os.uname()[0].lower()}"
96 BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
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}"
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}-"
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}"
125 # A shortcut for the commonly used value
126 EXEEXT = "${HOST_EXEEXT}"
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}"
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}"
140 # select proper CPU to get binary locales generated
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"
147 ##################################################################
148 # Date/time variables.
149 ##################################################################
151 DATE := "${@time.strftime('%Y%m%d',time.gmtime())}"
152 TIME := "${@time.strftime('%H%M%S',time.gmtime())}"
153 DATETIME = "${DATE}${TIME}"
155 ##################################################################
156 # Openembedded Software Prerequisites.
157 ##################################################################
159 # python-native should be here but python relies on building
167 perl-native-runtime \
168 python-native-runtime \
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}"
186 # Define a PR for kernels that machines can override so things like
187 # modules get rebuilt
188 MACHINE_KERNEL_PR = ""
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)}"
200 PRIORITY = "optional"
201 DESCRIPTION = "Version ${PV}-${PR} of package ${PN}"
203 MAINTAINER = "OpenEmbedded Team <openembedded-devel@lists.openembedded.org>"
206 # Package dependencies and provides.
208 # Ensure that -dev packages recommend the corresponding -dev packages of their
209 # deps, and the same for -dbg.
211 DEPCHAIN_POST = "-dev -dbg"
216 PROVIDES_prepend = "${P} ${PF} ${PN} "
219 MULTI_PROVIDER_WHITELIST = "virtual/libintl"
222 SOLIBS_darwin = ".*.dylib"
223 SOLIBS_darwin8 = ".*.dylib"
224 SOLIBS_darwin9 = ".*.dylib"
227 SOLIBSDEV_darwin = ".dylib"
228 SOLIBSDEV_darwin8 = ".dylib"
229 SOLIBSDEV_darwin9 = ".dylib"
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-*"
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"
245 FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
246 ${datadir}/gnome/help"
247 SECTION_${PN}-doc = "doc"
249 FILES_${PN}-static = "${libdir}/*.a ${base_libdir}/*.a"
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})"
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 ${datadir}/gdb/autoload"
261 SECTION_${PN}-dbg = "devel"
262 ALLOW_EMPTY_${PN}-dbg = "1"
263 RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
265 FILES_${PN}-locale = "${datadir}/locale"
269 export MANIFEST = "${FILESDIR}/manifest"
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), '.')}"
278 ##################################################################
279 # General work and output directories for the build system.
280 ##################################################################
282 TMPDIR = "${TOPDIR}/tmp"
283 CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}"
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"
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}"
298 STAGING_DIR = "${TMPDIR}/sysroots"
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_SBINDIR_NATIVE = "${STAGING_DIR_NATIVE}${sbindir_native}"
304 STAGING_BINDIR_CROSS = "${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"
305 STAGING_BINDIR_CROSS_BASEPKG = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_TARGET_SYS}"
306 STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
307 STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
308 STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
309 STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"
311 # This should really be MULTIMACH_HOST_SYS but that breaks "all" and machine
312 # specific packages - hack around it for now.
313 STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
314 STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
315 STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}"
316 STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"
317 STAGING_ETCDIR = "${STAGING_DIR_HOST}${sysconfdir}"
318 STAGING_DATADIR = "${STAGING_DIR_HOST}${datadir}"
319 STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}"
320 STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
321 STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
322 STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"
324 # This should really be MULTIMACH_TARGET_SYS but that breaks "all" and machine
325 # specific packages - hack around it for now.
326 STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
328 STAGING_DIR_SDK = "${STAGING_DIR}/${SDK_SYS}"
330 # Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using
331 # packaged staging and/or multimachine.
332 DEPLOY_DIR ?= "${TMPDIR}/deploy"
333 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
334 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
335 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
336 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
337 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
338 DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
340 PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
342 SDK_NAME = "${DISTRO}/${TARGET_ARCH}"
343 SDK_PATH = "/usr/local/${SDK_NAME}"
344 SDKPATH = "${SDK_PATH}"
346 ##################################################################
348 ##################################################################
350 STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/kernel"
352 ##################################################################
353 # Specific image creation and rootfs population info.
354 ##################################################################
356 IMAGE_ROOTFS = "${TMPDIR}/rootfs/${PN}"
357 IMAGE_BASENAME = "${PN}"
358 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
359 IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
360 IMAGE_EXTRA_SPACE = 10240
362 UBI_VOLNAME ?= "${MACHINE}-rootfs"
365 IMAGE_CMD_jffs2 = "mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
366 IMAGE_CMD_yaffs2 = "mkyaffs2image ${EXTRA_IMAGECMD} ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2"
367 IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
368 IMAGE_CMD_ext2 = "genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}"
369 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"
370 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"
371 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"
372 IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
373 IMAGE_CMD_squashfs-lzma = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend -comp lzma"
374 IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
375 IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
376 IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
377 IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}"
378 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}"
379 IMAGE_CMD_cpio.gz.u-boot = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}; mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz.u-boot"
380 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}"
381 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"
382 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
385 EXTRA_IMAGECMD_jffs2 = ""
386 EXTRA_IMAGECMD_yaffs2 = "1"
387 EXTRA_IMAGECMD_squashfs = ""
388 EXTRA_IMAGECMD_squashfs-lzma = ""
389 EXTRA_IMAGECMD_cpio = ""
390 EXTRA_IMAGECMD_cpio.gz = ""
391 EXTRA_IMAGECMD_cpio.lzma = ""
392 EXTRA_IMAGECMD_ubi = ""
393 EXTRA_IMAGECMD_ubifs = ""
396 IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
397 IMAGE_DEPENDS_yaffs2 = "yaffs2-utils-native"
398 IMAGE_DEPENDS_cramfs = "cramfs-native"
399 IMAGE_DEPENDS_ext2 = "genext2fs-native"
400 IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
401 IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
402 IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
403 IMAGE_DEPENDS_cpio.gz.u-boot = "u-boot-mkimage-native"
404 IMAGE_DEPENDS_cpio.lzma = "lzma-native"
405 IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
406 IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
407 IMAGE_DEPENDS_ubi = "mtd-utils-native"
408 IMAGE_DEPENDS_ubifs = "mtd-utils-native"
410 EXTRA_IMAGEDEPENDS = ""
412 ##################################################################
414 ##################################################################
416 CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}"
417 CROSS_DATADIR = "${CROSS_DIR}/share"
418 PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_BINDIR_CROSS_BASEPKG}:${STAGING_SBINDIR_NATIVE}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/${bindir_cross}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:"
421 ##################################################################
422 # Build utility info.
423 ##################################################################
425 CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}"
426 TOOLCHAIN_OPTIONS = ""
427 TOOLCHAIN_PATH ?= "${CROSS_DIR}"
428 TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}"
430 export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
431 export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
432 export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
433 export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS}"
434 export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS}"
435 export CCLD = "${CC}"
436 export AR = "${HOST_PREFIX}ar"
437 export AS = "${HOST_PREFIX}as"
438 export RANLIB = "${HOST_PREFIX}ranlib"
439 export STRIP = "${HOST_PREFIX}strip"
440 export OBJCOPY = "${HOST_PREFIX}objcopy"
441 export OBJDUMP = "${HOST_PREFIX}objdump"
442 export NM = "${HOST_PREFIX}nm"
443 PYTHON = "${@sys.executable}"
445 export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
446 export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
447 export BUILD_F77 = "${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}"
448 export BUILD_CPP = "${BUILD_PREFIX}cpp"
449 export BUILD_LD = "${BUILD_PREFIX}ld"
450 export BUILD_CCLD = "${BUILD_PREFIX}gcc"
451 export BUILD_AR = "${BUILD_PREFIX}ar"
452 export BUILD_RANLIB = "${BUILD_PREFIX}ranlib"
453 export BUILD_STRIP = "${BUILD_PREFIX}strip"
456 EXTRA_OEMAKE = "-e MAKEFLAGS="
458 ##################################################################
460 ##################################################################
462 PATCHRESOLVE = 'noop'
464 ##################################################################
465 # Build flags and options.
466 ##################################################################
468 export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
469 export CPPFLAGS = "${TARGET_CPPFLAGS}"
470 export TARGET_CPPFLAGS = "-isystem${STAGING_DIR_TARGET}${includedir}"
471 export SDK_CPPFLAGS = "-isystem${STAGING_DIR_SDK}${includedir} -isystem${STAGING_DIR_HOST}${includedir}"
473 export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
474 export CFLAGS = "${TARGET_CFLAGS}"
475 export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
476 export SDK_CFLAGS = "${SDK_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
478 export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive"
479 export CXXFLAGS = "${TARGET_CXXFLAGS}"
480 export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive"
481 export SDK_CXXFLAGS = "${SDK_CFLAGS} -fpermissive"
483 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
484 -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \
485 -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-O1"
487 export LDFLAGS = "${TARGET_LDFLAGS}"
488 export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \
489 -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir} \
491 ${TARGET_LINK_HASH_STYLE}"
492 export SDK_LDFLAGS = "-L${STAGING_DIR_SDK}${libdir} \
493 -Wl,-rpath-link,${STAGING_DIR_SDK}${libdir} \
496 # Which flags to leave by strip-flags() in bin/build/oebuild.sh ?
497 ALLOWED_FLAGS = "-O -mcpu -march -pipe"
499 # Pass parallel make options to the compile task only
500 EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} "
501 EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
503 ##################################################################
504 # Optimization flags.
505 ##################################################################
507 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
508 DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
509 SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
510 BUILD_OPTIMIZATION = "-O2 -g"
512 ##################################################################
514 ##################################################################
516 BOOTSTRAP_EXTRA_RDEPENDS = ""
517 BOOTSTRAP_EXTRA_RRECOMMENDS = ""
519 ##################################################################
521 ##################################################################
523 export QTDIR = "${STAGING_DIR_HOST}/qt2"
524 export QPEDIR = "${STAGING_DIR_HOST}"
525 export OPIEDIR = "${STAGING_DIR_HOST}"
526 export palmtopdir = "${libdir}/opie"
527 export palmqtdir = "${palmtopdir}"
529 ##################################################################
530 # Download locations and utilities.
531 ##################################################################
533 OE_STRICT_CHECKSUMS ?= "1"
535 ADOBE_MIRROR = "http://fpdownload.macromedia.com/get/flashplayer/current/"
536 APACHE_MIRROR = "http://www.apache.org/dist"
537 DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
538 E_CVS = "cvs://anonymous@anoncvs.enlightenment.org/var/cvs/e"
539 E_URI = "http://enlightenment.freedesktop.org/files"
540 FREEBSD_MIRROR = "ftp://ftp.freebsd.org/pub/FreeBSD/"
541 FREEDESKTOP_CVS = "cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs"
542 FREESMARTPHONE_GIT = "git://git.freesmartphone.org"
543 GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
544 GNOME_GIT = "git://git.gnome.org"
545 GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
546 GNU_MIRROR = "ftp://ftp.gnu.org/gnu"
547 GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
548 GPE_EXTRA_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=${PN}"
549 GPE_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=${PN}"
550 GPEPHONE_MIRROR = "http://gpephone.linuxtogo.org/download/gpephone"
551 GPEPHONE_SVN = "svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=${PN}"
552 HANDHELDS_CVS = "cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs"
553 KERNELORG_MIRROR = "http://kernel.org"
554 SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"
555 XLIBS_MIRROR = "http://xlibs.freedesktop.org/release"
556 XORG_MIRROR = "http://xorg.freedesktop.org/releases"
558 # You can use the mirror of your country to get faster downloads by putting
559 # export DEBIAN_MIRROR = "ftp://ftp.de.debian.org/debian/pool"
560 # into your local.conf
562 FETCHCMD_svn = "/usr/bin/env svn"
563 FETCHCMD_cvs = "/usr/bin/env cvs"
564 FETCHCMD_wget = "/usr/bin/env wget -t 5 --no-check-certificate"
565 FETCHCMD_bzr = "/usr/bin/env bzr"
566 FETCHCMD_hg = "/usr/bin/env hg"
568 FETCHCOMMAND = "ERROR, this must be a BitBake bug"
569 FETCHCOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
570 FETCHCOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
571 FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
572 RESUMECOMMAND = "ERROR, this must be a BitBake bug"
573 RESUMECOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -c -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
574 UPDATECOMMAND = "ERROR, this must be a BitBake bug"
575 UPDATECOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
576 UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
579 SRCPV = "${@bb.fetch.get_srcrev(d)}"
582 # For now disable autoincrement of revision counter in SRCPV, whoever wants it, should enable it in local.conf or distro config
583 # Revision counter is incremented only locally (bad for multiple builders filling shared feeds), LOCALCOUNT can be used to maintain
584 # counter globally in OE metadata (LOCALCOUNT value set in recipe).
585 # Make sure you disable it, if you want always upgradable paths for git recipes without bumping LOCALCOUNT with every SRCREV change
586 # or if you're using AUTOREV feature.
587 BB_LOCALCOUNT_OVERRIDE = "1"
589 # Value for revision counter in GIT recipes (NNNN in PV="1.0+gitrNNNN+a7401084a72285c8d3485bacf4eed593f303b1b7-r4.4")
592 SRC_URI = "file://${FILE}"
594 ##################################################################
595 # UI/Interaction Configuration
596 ##################################################################
598 SHELLRCCMD = "bash --rcfile $TERMRCFILE"
599 export SHELLCMDS = "${SHELLRCCMD}"
600 # Some common terminal programs to choose from
601 GNOME_TERMCMD = 'gnome-terminal --disable-factory -t "$TERMWINDOWTITLE"'
602 GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x $SHELLCMDS'
603 SCREEN_TERMCMD = 'screen -D -m -t "$TERMWINDOWTITLE"'
604 SCREEN_TERMCMDRUN = '${SCREEN_TERMCMD} $SHELLCMDS'
605 XTERM_TERMCMD = 'xterm -T "$TERMWINDOWTITLE"'
606 XTERM_TERMCMDRUN = '${XTERM_TERMCMD} -e $SHELLCMDS'
607 KONSOLE_TERMCMD = 'konsole -T "$TERMWINDOWTITLE"'
608 KONSOLE_TERMCMDRUN = '${KONSOLE_TERMCMD} -e $SHELLCMDS'
611 TERMCMD ?= "${GNOME_TERMCMD}"
612 TERMCMDRUN ?= "${GNOME_TERMCMDRUN}"
614 ##################################################################
615 # Miscellaneous utilities.
616 ##################################################################
618 MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
619 MKTEMPCMD = "mktemp -q ${TMPBASE}"
621 # GNU patch tries to be intellgent about checking out read-only files from
622 # a RCS, which freaks out those special folks with active Perforce clients
623 # the following makes patch ignore RCS:
627 # Program to be used to build ipkg packages
629 IPKGBUILDCMD = "ipkg-build -o 0 -g 0"
631 ##################################################################
632 # Not sure about the rest of this yet.
633 ##################################################################
635 # slot - currently unused by OE. portage remnants
640 export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
641 export PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
642 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
643 export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
645 export XDG_DATA_DIRS = "${STAGING_DATADIR}"
647 export QMAKE_MKSPEC_PATH = "${STAGING_DATADIR_NATIVE}/qmake"
648 export STAGING_SIPDIR = "${STAGING_DATADIR_NATIVE}/sip"
649 export STAGING_IDLDIR = "${STAGING_DATADIR}/idl"
651 # library package naming
652 AUTO_LIBNAME_PKGS = "${PACKAGES}"
654 # Globally toggle certain dependencies
655 ENTERPRISE_DISTRO ?= "0"
657 # Pre-build configuration output
659 BUILDCFG_HEADER = "Build Configuration:"
660 BUILDCFG_VARS ?= "BB_VERSION METADATA_BRANCH METADATA_REVISION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION"
661 BUILDCFG_VARS_append_arm = " TARGET_FPU"
662 BUILDCFG_VARS_append_armeb = " TARGET_FPU"
663 BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS"
666 ### Config file processing
669 # Overrides are processed left to right, so the ones that are named later take precedence.
670 # You generally want them to go from least to most specific.
672 # This means that an envionment variable named '<foo>_arm' overrides an
673 # environment variable '<foo>' (when ${TARGET_ARCH} is arm).
674 # an environment variable '<foo>_ramses' overrides '<foo>' but doesn't override
675 # '<foo>_arm' when ${MACHINE} is 'ramses'.
676 # If you use combination ie '<foo>_arm_ramses', then '<foo>_arm_ramses' will override
677 # '<foo>_arm' and then '<foo>' will be overriden with that value from '<foo>_arm'.
678 # And finally '<foo>_local' overrides anything, but with lowest priority.
680 # This works for functions as well, they are really just environment variables.
681 # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
682 OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
683 # Alternative OVERRIDES definition without "fail fast", usually only for native building and Scratchbox toolchains.
684 #OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}"
686 ##################################################################
687 # Include the rest of the config files.
688 ##################################################################
690 include conf/site.conf
691 include conf/auto.conf
692 include conf/local.conf
693 # USERDISTRO should always contain original DISTRO value as set by user
694 # If a distro config overrides DISTRO for whatever reason (e.g. to get
695 # overrides like it wants), USERDISTRO must be reassigned with := first
696 USERDISTRO = "${DISTRO}"
697 include conf/build/${BUILD_SYS}.conf
698 include conf/target/${TARGET_SYS}.conf
699 include conf/machine/${MACHINE}.conf
700 include conf/distro/${DISTRO}.conf
701 include conf/documentation.conf
702 require conf/sanity.conf
703 require conf/abi_version.conf
704 require conf/enterprise.conf
705 require conf/compatibility-providers.conf
707 ##################################################################
708 # Weak variables (usually to retain backwards compatibility)
709 ##################################################################
711 DL_DIR ?= "${TMPDIR}/downloads"
712 PSTAGE_DIR ?= "${TMPDIR}/pstage"
713 IMAGE_FSTYPES ?= "tar.gz"
714 PCMCIA_MANAGER ?= "pcmcia-cs"
715 DEFAULT_TASK_PROVIDER ?= "task-base"
716 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
717 IMAGE_ROOTFS_SIZE ?= "65536"
718 IMAGE_ROOTFS_SIZE_ext2 ?= "65536"
719 IMAGE_ROOTFS_SIZE_ext2.gz ?= "65536"
720 IMAGE_ROOTFS_SIZE_ext3 ?= "65536"
721 IMAGE_ROOTFS_SIZE_ext3.gz ?= "65536"
724 # Forcefully set CACHE now so future changes to things like
725 # MACHINE don't change the path to the cache
728 # Default to disabling packaged staging code
729 export PSTAGING_ACTIVE = "0"
731 ##################################################################
732 # Magic Cookie for SANITY CHECK
733 ##################################################################
734 OES_BITBAKE_CONF = "1"
736 ##################################################################
737 # Machine properties and task-base stuff
738 ##################################################################
740 MACHINE_FEATURES ?= "kernel26"
741 DISTRO_FEATURES ?= ""
743 # This is used to limit what packages goes into images built, so set big by default
744 ROOT_FLASH_SIZE ?= "256"
746 MACHINE_GUI_CLASS ?= "smallscreen"
747 # GUI_MACHINE_CLASS is deprecated, please use MACHINE_GUI_CLASS instead
748 GUI_MACHINE_CLASS ?= "${MACHINE_GUI_CLASS}"
749 MACHINE_DISPLAY_WIDTH_PIXELS ?= "240"
750 MACHINE_DISPLAY_HEIGHT_PIXELS ?= "320"
751 MACHINE_DISPLAY_ORIENTATION ?= "0"
752 MACHINE_DISPLAY_BPP ?= "16"
754 DISTRO_EXTRA_RDEPENDS ?= ""
755 DISTRO_EXTRA_RRECOMMENDS ?= ""
756 MACHINE_EXTRA_RDEPENDS ?= ""
757 MACHINE_EXTRA_RRECOMMENDS ?= ""
758 MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
759 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
761 COMBINED_FEATURES = "\
762 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
763 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} \
764 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "ext2", d)} \
765 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "vfat", d)} \
766 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "irda", d)} \
767 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pcmcia", d)} \
768 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pci", d)} \
769 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} \
770 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)} \
771 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "wifi", d)}"
773 # We want madwifi if all of the following are true:
774 # - distro has pci, wifi, and madwifi in its features
775 # - machine has pci in its features
776 COMBINED_FEATURES += "${@base_ifelse( \
777 base_contains('DISTRO_FEATURES', ('pci', 'wifi', 'madwifi'), True, False, d) and \
778 base_contains('MACHINE_FEATURES', 'pci', True, False, d), \
781 # We want hostap if all of the following are true:
782 # - 'wifi' and 'hostap' are in distro features
783 # - either 'pci' or 'pcmcia' are in both distro and machine features
784 COMBINED_FEATURES += "${@base_ifelse( \
785 base_contains('DISTRO_FEATURES', ('wifi', 'hostap'), True, False, d) and \
786 ((base_contains('MACHINE_FEATURES', 'pci', True, False, d) and \
787 base_contains('DISTRO_FEATURES', 'pci', True, False, d)) or \
788 (base_contains('MACHINE_FEATURES', 'pcmcia', True, False, d) and \
789 base_contains('DISTRO_FEATURES', 'pcmcia', True, False, d))), \
792 # Make sure MACHINE isn't exported
793 # (breaks binutils at least)
794 MACHINE[unexport] = "1"
796 # Make sure TARGET_ARCH isn't exported
797 # (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this
798 # in them, undocumented)
799 TARGET_ARCH[unexport] = "1"
801 # Make sure DISTRO isn't exported
802 # (breaks sysvinit at least)
803 DISTRO[unexport] = "1"