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 = "${@oe.utils.ifelse(bool(d.getVar('MACHINE', True)), '${MACHINE}', \
132 'BASE_PACKAGE_ARCH')}"
133 PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}"
135 MULTIMACH_ARCH = "${PACKAGE_ARCH}"
136 MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
137 MULTIMACH_HOST_SYS = "${MULTIMACH_ARCH}${HOST_VENDOR}-${HOST_OS}"
138 BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
139 BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
141 # select proper CPU to get binary locales generated
143 QEMU_OPTIONS_iwmmxt = "-cpu pxa270-c5"
144 QEMU_OPTIONS_armv6 = "-cpu arm1136"
145 QEMU_OPTIONS_armv6-novfp = "-cpu arm1136"
146 QEMU_OPTIONS_armv7a = "-cpu cortex-a8"
148 ##################################################################
149 # Date/time variables.
150 ##################################################################
152 DATE := "${@time.strftime('%Y%m%d',time.gmtime())}"
153 TIME := "${@time.strftime('%H%M%S',time.gmtime())}"
154 DATETIME = "${DATE}${TIME}"
156 ##################################################################
157 # Openembedded Software Prerequisites.
158 ##################################################################
160 # python-native should be here but python relies on building
168 perl-native-runtime \
169 python-native-runtime \
175 ##################################################################
176 # Package default variables.
177 ##################################################################
178 PN = "${@bb.parse.BBHandler.vars_from_file('${FILE}', d)[0] or 'defaultpkgname'}"
179 PV = "${@bb.parse.BBHandler.vars_from_file('${FILE}', d)[1] or '1.0'}"
180 PR = "${@bb.parse.BBHandler.vars_from_file('${FILE}', d)[2] or 'r0'}"
181 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
183 EXTENDPE = "${@int('${PE}') and '${PE}_' or ''}"
184 EXTENDPEVER = "${@int('${PE}') and '${PE}:' or ''}"
185 EXTENDPV = "${EXTENDPEVER}${PV}-${PR}${DISTRO_PR}"
188 # Define a PR for kernels that machines can override so things like
189 # modules get rebuilt
190 MACHINE_KERNEL_PR = ""
193 # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
194 # otherwise it is the same as PN and P
195 SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian -sdk"
196 BPN = "${@base_prune_suffix('${PN}', '${SPECIAL_PKGSUFFIX}'.split(), d)}"
202 PRIORITY = "optional"
203 DESCRIPTION = "Version ${PV}-${PR} of package ${PN}"
205 MAINTAINER = "OpenEmbedded Team <openembedded-devel@lists.openembedded.org>"
208 # Package dependencies and provides.
210 # Ensure that -dev packages recommend the corresponding -dev packages of their
211 # deps, and the same for -dbg.
213 DEPCHAIN_POST = "-dev -dbg"
218 PROVIDES_prepend = "${P} ${PF} ${PN} "
221 MULTI_PROVIDER_WHITELIST = "virtual/libintl"
224 SOLIBS_darwin = ".*.dylib"
225 SOLIBS_darwin8 = ".*.dylib"
226 SOLIBS_darwin9 = ".*.dylib"
229 SOLIBSDEV_darwin = ".dylib"
230 SOLIBSDEV_darwin8 = ".dylib"
231 SOLIBSDEV_darwin9 = ".dylib"
233 PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-static ${PN}-locale"
234 #enable this when bitbake is upgraded to cope with ++ values in the field
235 PACKAGES_DYNAMIC = "${PN}-locale-*"
238 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
239 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
240 ${base_bindir}/* ${base_sbindir}/* \
241 ${base_libdir}/*${SOLIBS} \
242 ${datadir}/${PN} ${libdir}/${PN}/* \
243 ${datadir}/pixmaps ${datadir}/applications \
244 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
245 ${libdir}/bonobo/servers"
247 FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
248 ${datadir}/gnome/help"
249 SECTION_${PN}-doc = "doc"
251 FILES_${PN}-static = "${libdir}/*.a ${base_libdir}/*.a"
253 FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
254 ${libdir}/*.o ${libdir}/pkgconfig \
255 ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig"
256 SECTION_${PN}-dev = "devel"
257 ALLOW_EMPTY_${PN}-dev = "1"
258 RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"
260 FILES_${PN}-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
261 ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
262 ${libdir}/matchbox-panel/.debug ${datadir}/gdb/autoload"
263 SECTION_${PN}-dbg = "devel"
264 ALLOW_EMPTY_${PN}-dbg = "1"
265 RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
267 FILES_${PN}-locale = "${datadir}/locale"
271 export MANIFEST = "${FILESDIR}/manifest"
273 # file:// search paths
274 FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
275 FILESPATHBASE = "${FILE_DIRNAME}"
276 FILESPATHPKG = "${PF}:${P}:${PN}:${BP}:${BPN}:files:."
277 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(':')])}"
278 FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}"
280 ##################################################################
281 # General work and output directories for the build system.
282 ##################################################################
284 TMPDIR = "${TOPDIR}/tmp"
285 CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}"
287 CVSDIR = "${CO_DIR}/cvs"
288 SVNDIR = "${CO_DIR}/svn"
289 GITDIR = "${CO_DIR}/git"
290 BZRDIR = "${CO_DIR}/bzr"
291 HGDIR = "${CO_DIR}/hg"
293 STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}"
294 WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}"
295 T = "${WORKDIR}/temp"
296 D = "${WORKDIR}/image"
297 S = "${WORKDIR}/${BP}"
300 STAGING_DIR = "${TMPDIR}/sysroots"
302 STAGING_DIR_JAVA = "${STAGING_DIR}/java"
303 STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
304 STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}"
305 STAGING_SBINDIR_NATIVE = "${STAGING_DIR_NATIVE}${sbindir_native}"
306 STAGING_BINDIR_CROSS = "${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"
307 STAGING_BINDIR_CROSS_BASEPKG = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_TARGET_SYS}"
308 STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
309 STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
310 STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
311 STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"
313 # This should really be MULTIMACH_HOST_SYS but that breaks "all" and machine
314 # specific packages - hack around it for now.
315 STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
316 STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
317 STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}"
318 STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"
319 STAGING_ETCDIR = "${STAGING_DIR_HOST}${sysconfdir}"
320 STAGING_DATADIR = "${STAGING_DIR_HOST}${datadir}"
321 STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}"
322 STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
323 STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
324 STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"
326 # This should really be MULTIMACH_TARGET_SYS but that breaks "all" and machine
327 # specific packages - hack around it for now.
328 STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
330 STAGING_DIR_SDK = "${STAGING_DIR}/${SDK_SYS}"
332 # Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using
333 # packaged staging and/or multimachine.
334 DEPLOY_DIR ?= "${TMPDIR}/deploy"
335 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
336 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
337 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
338 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
339 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images"
340 DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
342 PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
344 SDK_NAME = "${DISTRO}/${TARGET_ARCH}"
345 SDK_PATH = "/usr/local/${SDK_NAME}"
346 SDKPATH = "${SDK_PATH}"
348 ##################################################################
350 ##################################################################
352 STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/kernel"
354 ##################################################################
355 # Specific image creation and rootfs population info.
356 ##################################################################
358 IMAGE_ROOTFS = "${TMPDIR}/rootfs/${PN}"
359 IMAGE_BASENAME = "${PN}"
360 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
361 IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
362 IMAGE_EXTRA_SPACE = 10240
364 UBI_VOLNAME ?= "${MACHINE}-rootfs"
367 IMAGE_CMD_jffs2 = "mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
368 IMAGE_CMD_yaffs2 = "mkyaffs2image ${EXTRA_IMAGECMD} ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2"
369 IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
370 IMAGE_CMD_ext2 = "genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}"
371 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"
372 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"
373 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"
374 IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
375 IMAGE_CMD_squashfs-lzma = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend -comp lzma"
376 IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
377 IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
378 IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
379 IMAGE_CMD_cpio = "cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) ${EXTRA_IMAGECMD}"
380 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}"
381 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"
382 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}"
383 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"
384 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}"
387 EXTRA_IMAGECMD_jffs2 = ""
388 EXTRA_IMAGECMD_yaffs2 = "1"
389 EXTRA_IMAGECMD_squashfs = ""
390 EXTRA_IMAGECMD_squashfs-lzma = ""
391 EXTRA_IMAGECMD_cpio = ""
392 EXTRA_IMAGECMD_cpio.gz = ""
393 EXTRA_IMAGECMD_cpio.lzma = ""
394 EXTRA_IMAGECMD_ubi = ""
395 EXTRA_IMAGECMD_ubifs = ""
398 IMAGE_DEPENDS_jffs2 = "mtd-utils-native"
399 IMAGE_DEPENDS_yaffs2 = "yaffs2-utils-native"
400 IMAGE_DEPENDS_cramfs = "cramfs-native"
401 IMAGE_DEPENDS_ext2 = "genext2fs-native"
402 IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
403 IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
404 IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
405 IMAGE_DEPENDS_cpio.gz.u-boot = "u-boot-mkimage-native"
406 IMAGE_DEPENDS_cpio.lzma = "lzma-native"
407 IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
408 IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
409 IMAGE_DEPENDS_ubi = "mtd-utils-native"
410 IMAGE_DEPENDS_ubifs = "mtd-utils-native"
412 EXTRA_IMAGEDEPENDS = ""
414 ##################################################################
416 ##################################################################
418 CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}"
419 CROSS_DATADIR = "${CROSS_DIR}/share"
420 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}:"
423 ##################################################################
424 # Build utility info.
425 ##################################################################
427 CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}"
428 TOOLCHAIN_OPTIONS = ""
429 TOOLCHAIN_PATH ?= "${CROSS_DIR}"
430 TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}"
432 export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
433 export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
434 export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
435 export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS}"
436 export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS}"
437 export CCLD = "${CC}"
438 export AR = "${HOST_PREFIX}ar"
439 export AS = "${HOST_PREFIX}as"
440 export RANLIB = "${HOST_PREFIX}ranlib"
441 export STRIP = "${HOST_PREFIX}strip"
442 export OBJCOPY = "${HOST_PREFIX}objcopy"
443 export OBJDUMP = "${HOST_PREFIX}objdump"
444 export NM = "${HOST_PREFIX}nm"
445 PYTHON = "${@sys.executable}"
447 export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
448 export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}"
449 export BUILD_F77 = "${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}"
450 export BUILD_CPP = "${BUILD_PREFIX}cpp"
451 export BUILD_LD = "${BUILD_PREFIX}ld"
452 export BUILD_CCLD = "${BUILD_PREFIX}gcc"
453 export BUILD_AR = "${BUILD_PREFIX}ar"
454 export BUILD_RANLIB = "${BUILD_PREFIX}ranlib"
455 export BUILD_STRIP = "${BUILD_PREFIX}strip"
458 EXTRA_OEMAKE = "-e MAKEFLAGS="
460 ##################################################################
462 ##################################################################
464 PATCHRESOLVE = 'noop'
466 ##################################################################
467 # Build flags and options.
468 ##################################################################
470 export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
471 export CPPFLAGS = "${TARGET_CPPFLAGS}"
472 export TARGET_CPPFLAGS = "-isystem${STAGING_DIR_TARGET}${includedir}"
473 export SDK_CPPFLAGS = "-isystem${STAGING_DIR_SDK}${includedir} -isystem${STAGING_DIR_HOST}${includedir}"
475 export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
476 export CFLAGS = "${TARGET_CFLAGS}"
477 export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
478 export SDK_CFLAGS = "${SDK_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
480 export BUILD_CXXFLAGS = "${BUILD_CFLAGS} -fpermissive"
481 export CXXFLAGS = "${TARGET_CXXFLAGS}"
482 export TARGET_CXXFLAGS = "${TARGET_CFLAGS} -fpermissive"
483 export SDK_CXXFLAGS = "${SDK_CFLAGS} -fpermissive"
485 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
486 -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \
487 -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-O1"
489 export LDFLAGS = "${TARGET_LDFLAGS}"
490 export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \
491 -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir} \
493 ${TARGET_LINK_HASH_STYLE}"
494 export SDK_LDFLAGS = "-L${STAGING_DIR_SDK}${libdir} \
495 -Wl,-rpath-link,${STAGING_DIR_SDK}${libdir} \
498 # Which flags to leave by strip-flags() in bin/build/oebuild.sh ?
499 ALLOWED_FLAGS = "-O -mcpu -march -pipe"
501 # Pass parallel make options to the compile task only
502 EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} "
503 EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
505 ##################################################################
506 # Optimization flags.
507 ##################################################################
509 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
510 DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g"
511 SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
512 BUILD_OPTIMIZATION = "-O2 -g"
514 ##################################################################
516 ##################################################################
518 BOOTSTRAP_EXTRA_RDEPENDS = ""
519 BOOTSTRAP_EXTRA_RRECOMMENDS = ""
521 ##################################################################
523 ##################################################################
525 export QTDIR = "${STAGING_DIR_HOST}/qt2"
526 export QPEDIR = "${STAGING_DIR_HOST}"
527 export OPIEDIR = "${STAGING_DIR_HOST}"
528 export palmtopdir = "${libdir}/opie"
529 export palmqtdir = "${palmtopdir}"
531 ##################################################################
532 # Download locations and utilities.
533 ##################################################################
535 OE_STRICT_CHECKSUMS ?= "1"
537 ADOBE_MIRROR = "http://fpdownload.macromedia.com/get/flashplayer/current/"
538 APACHE_MIRROR = "http://www.apache.org/dist"
539 DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
540 E_CVS = "cvs://anonymous@anoncvs.enlightenment.org/var/cvs/e"
541 E_URI = "http://enlightenment.freedesktop.org/files"
542 FREEBSD_MIRROR = "ftp://ftp.freebsd.org/pub/FreeBSD/"
543 FREEDESKTOP_CVS = "cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs"
544 FREESMARTPHONE_GIT = "git://git.freesmartphone.org"
545 GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
546 GNOME_GIT = "git://git.gnome.org"
547 GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
548 GNU_MIRROR = "ftp://ftp.gnu.org/gnu"
549 GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
550 GPE_EXTRA_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=${PN}"
551 GPE_SVN = "svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=${PN}"
552 GPEPHONE_MIRROR = "http://gpephone.linuxtogo.org/download/gpephone"
553 GPEPHONE_SVN = "svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=${PN}"
554 HANDHELDS_CVS = "cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs"
555 KERNELORG_MIRROR = "http://kernel.org"
556 SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"
557 XLIBS_MIRROR = "http://xlibs.freedesktop.org/release"
558 XORG_MIRROR = "http://xorg.freedesktop.org/releases"
560 # You can use the mirror of your country to get faster downloads by putting
561 # export DEBIAN_MIRROR = "ftp://ftp.de.debian.org/debian/pool"
562 # into your local.conf
564 FETCHCMD_svn = "/usr/bin/env svn"
565 FETCHCMD_cvs = "/usr/bin/env cvs"
566 FETCHCMD_wget = "/usr/bin/env wget -t 5 --no-check-certificate"
567 FETCHCMD_bzr = "/usr/bin/env bzr"
568 FETCHCMD_hg = "/usr/bin/env hg"
570 FETCHCOMMAND = "ERROR, this must be a BitBake bug"
571 FETCHCOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
572 FETCHCOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
573 FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
574 RESUMECOMMAND = "ERROR, this must be a BitBake bug"
575 RESUMECOMMAND_wget = "/usr/bin/env 'PATH=${PATH}' wget -c -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
576 UPDATECOMMAND = "ERROR, this must be a BitBake bug"
577 UPDATECOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
578 UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
581 SRCPV = "${@bb.fetch.get_srcrev(d)}"
584 # For now disable autoincrement of revision counter in SRCPV, whoever wants it, should enable it in local.conf or distro config
585 # Revision counter is incremented only locally (bad for multiple builders filling shared feeds), LOCALCOUNT can be used to maintain
586 # counter globally in OE metadata (LOCALCOUNT value set in recipe).
587 # Make sure you disable it, if you want always upgradable paths for git recipes without bumping LOCALCOUNT with every SRCREV change
588 # or if you're using AUTOREV feature.
589 BB_LOCALCOUNT_OVERRIDE = "1"
591 # Value for revision counter in GIT recipes (NNNN in PV="1.0+gitrNNNN+a7401084a72285c8d3485bacf4eed593f303b1b7-r4.4")
594 SRC_URI = "file://${FILE}"
596 ##################################################################
597 # UI/Interaction Configuration
598 ##################################################################
600 SHELLRCCMD = "bash --rcfile $TERMRCFILE"
601 export SHELLCMDS = "${SHELLRCCMD}"
602 # Some common terminal programs to choose from
603 GNOME_TERMCMD = 'gnome-terminal --disable-factory -t "$TERMWINDOWTITLE"'
604 GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x $SHELLCMDS'
605 SCREEN_TERMCMD = 'screen -D -m -t "$TERMWINDOWTITLE"'
606 SCREEN_TERMCMDRUN = '${SCREEN_TERMCMD} $SHELLCMDS'
607 XTERM_TERMCMD = 'xterm -T "$TERMWINDOWTITLE"'
608 XTERM_TERMCMDRUN = '${XTERM_TERMCMD} -e $SHELLCMDS'
609 KONSOLE_TERMCMD = 'konsole -T "$TERMWINDOWTITLE"'
610 KONSOLE_TERMCMDRUN = '${KONSOLE_TERMCMD} -e $SHELLCMDS'
613 TERMCMD ?= "${GNOME_TERMCMD}"
614 TERMCMDRUN ?= "${GNOME_TERMCMDRUN}"
616 ##################################################################
617 # Miscellaneous utilities.
618 ##################################################################
620 MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
621 MKTEMPCMD = "mktemp -q ${TMPBASE}"
623 # GNU patch tries to be intellgent about checking out read-only files from
624 # a RCS, which freaks out those special folks with active Perforce clients
625 # the following makes patch ignore RCS:
629 # Program to be used to build ipkg packages
631 IPKGBUILDCMD = "ipkg-build -o 0 -g 0"
633 ##################################################################
634 # Not sure about the rest of this yet.
635 ##################################################################
637 # slot - currently unused by OE. portage remnants
642 export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
643 export PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
644 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
645 export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
647 export XDG_DATA_DIRS = "${STAGING_DATADIR}"
649 export QMAKE_MKSPEC_PATH = "${STAGING_DATADIR_NATIVE}/qmake"
650 export STAGING_SIPDIR = "${STAGING_DATADIR_NATIVE}/sip"
651 export STAGING_IDLDIR = "${STAGING_DATADIR}/idl"
653 # library package naming
654 AUTO_LIBNAME_PKGS = "${PACKAGES}"
656 # Globally toggle certain dependencies
657 ENTERPRISE_DISTRO ?= "0"
659 # Pre-build configuration output
661 BUILDCFG_HEADER = "Build Configuration:"
662 BUILDCFG_VARS ?= "BB_VERSION METADATA_BRANCH METADATA_REVISION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION"
663 BUILDCFG_VARS_append_arm = " TARGET_FPU"
664 BUILDCFG_VARS_append_armeb = " TARGET_FPU"
665 BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS"
668 ### Config file processing
671 # Overrides are processed left to right, so the ones that are named later take precedence.
672 # You generally want them to go from least to most specific.
674 # This means that an envionment variable named '<foo>_arm' overrides an
675 # environment variable '<foo>' (when ${TARGET_ARCH} is arm).
676 # an environment variable '<foo>_ramses' overrides '<foo>' but doesn't override
677 # '<foo>_arm' when ${MACHINE} is 'ramses'.
678 # If you use combination ie '<foo>_arm_ramses', then '<foo>_arm_ramses' will override
679 # '<foo>_arm' and then '<foo>' will be overriden with that value from '<foo>_arm'.
680 # And finally '<foo>_local' overrides anything, but with lowest priority.
682 # This works for functions as well, they are really just environment variables.
683 # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
684 OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
685 # Alternative OVERRIDES definition without "fail fast", usually only for native building and Scratchbox toolchains.
686 #OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}"
688 ##################################################################
689 # Include the rest of the config files.
690 ##################################################################
692 include conf/site.conf
693 include conf/auto.conf
694 include conf/local.conf
695 # USERDISTRO should always contain original DISTRO value as set by user
696 # If a distro config overrides DISTRO for whatever reason (e.g. to get
697 # overrides like it wants), USERDISTRO must be reassigned with := first
698 USERDISTRO = "${DISTRO}"
699 include conf/build/${BUILD_SYS}.conf
700 include conf/target/${TARGET_SYS}.conf
701 include conf/machine/${MACHINE}.conf
702 include conf/distro/${DISTRO}.conf
703 include conf/documentation.conf
704 require conf/sanity.conf
705 require conf/abi_version.conf
706 require conf/enterprise.conf
707 require conf/compatibility-providers.conf
709 ##################################################################
710 # Weak variables (usually to retain backwards compatibility)
711 ##################################################################
713 DL_DIR ?= "${TMPDIR}/downloads"
714 PSTAGE_DIR ?= "${TMPDIR}/pstage"
715 IMAGE_FSTYPES ?= "tar.gz"
716 PCMCIA_MANAGER ?= "pcmcia-cs"
717 DEFAULT_TASK_PROVIDER ?= "task-base"
718 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
719 IMAGE_ROOTFS_SIZE ?= "65536"
720 IMAGE_ROOTFS_SIZE_ext2 ?= "65536"
721 IMAGE_ROOTFS_SIZE_ext2.gz ?= "65536"
722 IMAGE_ROOTFS_SIZE_ext3 ?= "65536"
723 IMAGE_ROOTFS_SIZE_ext3.gz ?= "65536"
726 # Forcefully set CACHE now so future changes to things like
727 # MACHINE don't change the path to the cache
730 # Default to disabling packaged staging code
731 export PSTAGING_ACTIVE = "0"
733 ##################################################################
734 # Magic Cookie for SANITY CHECK
735 ##################################################################
736 OES_BITBAKE_CONF = "1"
738 ##################################################################
739 # Machine properties and task-base stuff
740 ##################################################################
742 MACHINE_FEATURES ?= "kernel26"
743 DISTRO_FEATURES ?= ""
745 # This is used to limit what packages goes into images built, so set big by default
746 ROOT_FLASH_SIZE ?= "256"
748 MACHINE_GUI_CLASS ?= "smallscreen"
749 # GUI_MACHINE_CLASS is deprecated, please use MACHINE_GUI_CLASS instead
750 GUI_MACHINE_CLASS ?= "${MACHINE_GUI_CLASS}"
751 MACHINE_DISPLAY_WIDTH_PIXELS ?= "240"
752 MACHINE_DISPLAY_HEIGHT_PIXELS ?= "320"
753 MACHINE_DISPLAY_ORIENTATION ?= "0"
754 MACHINE_DISPLAY_BPP ?= "16"
756 DISTRO_EXTRA_RDEPENDS ?= ""
757 DISTRO_EXTRA_RRECOMMENDS ?= ""
758 MACHINE_EXTRA_RDEPENDS ?= ""
759 MACHINE_EXTRA_RRECOMMENDS ?= ""
760 MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
761 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
763 COMBINED_FEATURES = "\
764 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
765 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} \
766 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "ext2", d)} \
767 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "vfat", d)} \
768 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "irda", d)} \
769 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pcmcia", d)} \
770 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pci", d)} \
771 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} \
772 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)} \
773 ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "wifi", d)}"
775 # We want madwifi if all of the following are true:
776 # - distro has pci, wifi, and madwifi in its features
777 # - machine has pci in its features
778 COMBINED_FEATURES += "${@base_ifelse( \
779 base_contains('DISTRO_FEATURES', ('pci', 'wifi', 'madwifi'), True, False, d) and \
780 base_contains('MACHINE_FEATURES', 'pci', True, False, d), \
783 # We want hostap if all of the following are true:
784 # - 'wifi' and 'hostap' are in distro features
785 # - either 'pci' or 'pcmcia' are in both distro and machine features
786 COMBINED_FEATURES += "${@base_ifelse( \
787 base_contains('DISTRO_FEATURES', ('wifi', 'hostap'), True, False, d) and \
788 ((base_contains('MACHINE_FEATURES', 'pci', True, False, d) and \
789 base_contains('DISTRO_FEATURES', 'pci', True, False, d)) or \
790 (base_contains('MACHINE_FEATURES', 'pcmcia', True, False, d) and \
791 base_contains('DISTRO_FEATURES', 'pcmcia', True, False, d))), \
794 # Make sure MACHINE isn't exported
795 # (breaks binutils at least)
796 MACHINE[unexport] = "1"
798 # Make sure TARGET_ARCH isn't exported
799 # (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this
800 # in them, undocumented)
801 TARGET_ARCH[unexport] = "1"
803 # Make sure DISTRO isn't exported
804 # (breaks sysvinit at least)
805 DISTRO[unexport] = "1"