From f2f02f6e4754f69b83de7613860fd580e27c0237 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 2 Mar 2010 13:27:22 +0100 Subject: base.bbclass: create tmp/legacy-staging.log file with names of recipes which need work Signed-off-by: Marcin Juszkiewicz --- classes/base.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 990e75ee14..358a9a2b68 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -1155,6 +1155,14 @@ python do_populate_staging () { if legacy: bb.data.setVar("SYSROOT_DESTDIR", "", d) bb.note("Legacy staging mode for %s" % bb.data.getVar("FILE", d, True)) + + try: + file = open("%s/legacy-staging.log" % bb.data.getVar("TMPDIR", d, 1), "a") + file.write("%s\n" % bb.data.getVar("FILE", d, True)) + file.close() + except: + pass + if bb.data.getVarFlags('do_stage', d) is None: bb.fatal("This recipe (%s) has a do_stage_prepend or do_stage_append and do_stage now doesn't exist. Please rename this to do_stage()" % bb.data.getVar("FILE", d, True)) lock = bb.utils.lockfile(lockfile) -- cgit v1.2.3 From 31e93854259130e20a4e08c9d803c34edc4b447e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 1 Mar 2010 11:18:28 +0000 Subject: qemu: Perform our sanity checks based on ENABLE_BINARY_LOCALE_GENERATION Perform qemu-related checks not based on if we're ARM but based on if we'll be using qemu for binary locale generation. Clarify what the first of these sanity checks does. Next, change the check for a provided qemu binary to be generic enough to work on all arches (and catch distribution or user built versions of qemu). While we're in here, correct the gcc version check code in base.bbclass. Signed-off-by: Tom Rini Acked-by: Denys Dmytriyenko Acked-by: Chris Larson --- classes/base.bbclass | 9 ++++----- classes/sanity.bbclass | 9 +++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 358a9a2b68..65ad478cbc 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -1341,16 +1341,15 @@ def check_app_exists(app, d): return len(which(path, app)) != 0 def check_gcc3(data): - # Primarly used by qemu to make sure we have a workable gcc-3.4.x. - # Start by checking for the program name as we build it, was not - # all host-provided gcc-3.4's will work. - + # Primarly used by qemu to make sure we have a workable gcc-3.x. + # Start by checking for the program name as we build it as there + # are some distribtuion provided gcc-3.x's that will not work. gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' for gcc3 in gcc3_versions.split(): if check_app_exists(gcc3, data): return gcc3 - + return False # Patch handling diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index b66c9a9877..a78e8edf8a 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -83,8 +83,10 @@ def check_sanity(e): required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk md5sum" - if data.getVar('TARGET_ARCH', e.data, True) == "arm": - # qemu-native needs gcc 3.x + # If we'll be running qemu, perform some sanity checks + if data.getVar('ENABLE_BINARY_LOCALE_GENERATION', e.data, True): + # Some versions of qemu-native needs gcc 3.x. Do a special + # check here to allow for host 'gcc' is 3.x. if "qemu-native" not in assume_provided and "gcc3-native" in assume_provided: gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '") @@ -93,8 +95,7 @@ def check_sanity(e): missing = missing + "gcc-3.x (needed for qemu-native)," if "qemu-native" in assume_provided: - if not check_app_exists("qemu-arm", e.data): - messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH" + required_utilities += "qemu" try: if os.path.exists("/proc/sys/vm/mmap_min_addr"): -- cgit v1.2.3 From 2d132de5abecf53a9e340dc376bc8af4cfb07464 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 1 Mar 2010 16:34:37 +0000 Subject: Add glibc-pic package glibc-package.bbclass: Add glibc-pic package By default, in our glibc builds we don't have these libraries. They may however come from various binary toolchains, or custom source builds. Signed-off-by: Tom Rini Acked-by: Khem Raj --- classes/glibc-package.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/glibc-package.bbclass b/classes/glibc-package.bbclass index 413ed14931..af75bb53de 100644 --- a/classes/glibc-package.bbclass +++ b/classes/glibc-package.bbclass @@ -9,7 +9,7 @@ GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice" -PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-static glibc-doc glibc-locale libcidn libmemusage libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" +PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-pic glibc-dev glibc-static glibc-doc glibc-locale libcidn libmemusage libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*" INSANE_SKIP_glibc-dbg = True @@ -23,6 +23,7 @@ glibcfiles = "${libc_baselibs} ${libexecdir}/* ${datadir}/zoneinfo ${@base_condi glibcdbgfiles = "${bindir}/.debug ${sbindir}/.debug ${libdir}/.debug \ ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug \ ${libdir}/gconv/.debug ${libexecdir}/*/.debug" +glibcpicfiles = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/" glibcdevfiles = "${bindir}/rpcgen ${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \ ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${libdir}/*nonshared.a \ ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal" @@ -35,6 +36,8 @@ FILES_libcidn = "${base_libdir}/libcidn*.so" FILES_libmemusage = "${base_libdir}/libmemusage.so" FILES_glibc-extra-nss = "${base_libdir}/libnss*" FILES_sln = "${base_sbindir}/sln" +FILES_glibc-pic = "${glibcpicfiles}" +FILES_${PN}-pic = "${glibcpicfiles}" FILES_glibc-dev = "${glibcdevfiles}" FILES_${PN}-dev = "${glibcdevfiles}" FILES_glibc-dbg = "${glibcdbgfiles}" -- cgit v1.2.3 From 679a2367acde02f76f43f446c56c1eefed4e69c0 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 3 Mar 2010 12:05:33 -0700 Subject: firefox: Perform a number of cleanups and fix consistency issues. - parallel builds need to happen via MOZ_MAKE_FLAGS and it gripes if still passed -jN, so keep the old value before we clear it. - Move the HOST_LIBIDL stuff into configure, otherwise bad things happen when you don't have pkg-config on the build host. - Prior to 3.6, wireless-tools can be, or not be built already and the Necko wifi options deals. With how 3.6 is configured, it must be disabled or DEPENDED on. For consistency, turn it off. - In 3.5 and newer, libnotify can be used, add it to DEPENDS (could be disabled). - Because of both of the above, bump PR. Signed-off-by: Tom Rini Acked-by: Khem Raj --- classes/mozilla.bbclass | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'classes') diff --git a/classes/mozilla.bbclass b/classes/mozilla.bbclass index c9a3966709..4e3054b9ab 100644 --- a/classes/mozilla.bbclass +++ b/classes/mozilla.bbclass @@ -6,10 +6,12 @@ SRC_URI += "file://mozconfig" inherit gettext pkgconfig +# Parallel make is special in mozilla. +OLD_PARALLEL_MAKE := "${PARALLEL_MAKE}" +PARALLEL_MAKE = "" + EXTRA_OECONF = "--target=${TARGET_SYS} --host=${BUILD_SYS} \ --build=${BUILD_SYS} --prefix=${prefix}" -EXTRA_OEMAKE = "'HOST_LIBIDL_LIBS=${HOST_LIBIDL_LIBS}' \ - 'HOST_LIBIDL_CFLAGS=${HOST_LIBIDL_CFLAGS}'" SELECTED_OPTIMIZATION = "-Os -fsigned-char -fno-strict-aliasing" export CROSS_COMPILE = "1" @@ -17,9 +19,6 @@ export MOZCONFIG = "${WORKDIR}/mozconfig" export MOZ_OBJDIR = "${S}" export CONFIGURE_ARGS = "${EXTRA_OECONF}" -export HOST_LIBIDL_CFLAGS = "`${HOST_LIBIDL_CONFIG} --cflags`" -export HOST_LIBIDL_LIBS = "`${HOST_LIBIDL_CONFIG} --libs`" -export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0" export HOST_CC = "${BUILD_CC}" export HOST_CXX = "${BUILD_CXX}" export HOST_CFLAGS = "${BUILD_CFLAGS}" @@ -38,7 +37,22 @@ mozilla_do_configure() { `dirname $cg`/ done ) - if [ -e ${MOZ_OBJDIR}/Makefile ] ; then + + # Put PARALLEL_MAKE into mozconfig + if [ ! -z "${OLD_PARALLEL_MAKE}" ] ; then + echo mk_add_options MOZ_MAKE_FLAGS=\"${OLD_PARALLEL_MAKE}\" \ + >> ${MOZCONFIG} + fi + + # Set the host libIDL stuff correctly. + export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0" + # Due to sysroot we need to sed out references to the target staging + # when building the native version of xpidl Symptons of the failure + # include "gthread.h:344: error: size of array 'type name' is negative" + export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags | sed -e s:${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}:g`" + export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`" + + if [ -e ${MOZ_OBJDIR}/Makefile ] ; then oe_runmake -f client.mk ${MOZ_OBJDIR}/Makefile \ ${MOZ_OBJDIR}/config.status fi -- cgit v1.2.3 From 27de16184dccb7b3a49bd08c9282fe4843d00251 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 3 Mar 2010 14:04:57 -0700 Subject: qemu: Move gcc version check, qemu-TARGET logic into qemu.bbclass Move the logic to determine what qemu-TARGET to run into qemu.bbclass so we can check for the right binary in sanity.bbclass. This code was duplicated by glibc-package and eglibc-package anyhow and with the new fn we can clean up the usage in these classes a bit. Now that we have a class for qemu stuff, and the gcc check is just for qemu, move it there. --- classes/base.bbclass | 12 ------------ classes/glibc-package.bbclass | 15 +++++---------- classes/qemu.bbclass | 27 +++++++++++++++++++++++++++ classes/sanity.bbclass | 4 +++- 4 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 classes/qemu.bbclass (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 65ad478cbc..c083d48d85 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -1340,18 +1340,6 @@ def check_app_exists(app, d): path = data.getVar('PATH', d, 1) return len(which(path, app)) != 0 -def check_gcc3(data): - # Primarly used by qemu to make sure we have a workable gcc-3.x. - # Start by checking for the program name as we build it as there - # are some distribtuion provided gcc-3.x's that will not work. - gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' - - for gcc3 in gcc3_versions.split(): - if check_app_exists(gcc3, data): - return gcc3 - - return False - # Patch handling inherit patch diff --git a/classes/glibc-package.bbclass b/classes/glibc-package.bbclass index af75bb53de..d47c914b36 100644 --- a/classes/glibc-package.bbclass +++ b/classes/glibc-package.bbclass @@ -7,6 +7,8 @@ # "precompiled" - The binary locale files are pregenerated and already present # "ondevice" - The device will build the locale files upon first boot through the postinst +inherit qemu + GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice" PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-pic glibc-dev glibc-static glibc-doc glibc-locale libcidn libmemusage libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile" @@ -215,12 +217,6 @@ python package_do_split_gconvs () { bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d) def output_locale_binary(name, pkgname, locale, encoding): - target_arch = bb.data.getVar("TARGET_ARCH", d, 1) - if target_arch in ("i486", "i586", "i686"): - target_arch = "i386" - elif target_arch == "powerpc": - target_arch = "ppc" - # This is a hack till linux-libc-headers gets patched for the missing arm syscalls and all arm device kernels as well if bb.data.getVar("DISTRO_NAME", d, 1) == "Angstrom": kernel_ver = "2.6.24" @@ -229,10 +225,9 @@ python package_do_split_gconvs () { else: kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1) - if kernel_ver is None: - qemu = "qemu-%s -s 1048576" % target_arch - else: - qemu = "qemu-%s -s 1048576 -r %s" % (target_arch, kernel_ver) + qemu = qemu_target_binary(d) + " -s 1048576" + if kernel_ver: + qemu += " -r %s" % (kernel_ver) pkgname = 'locale-base-' + legitimize_package_name(name) treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree") diff --git a/classes/qemu.bbclass b/classes/qemu.bbclass new file mode 100644 index 0000000000..40a3542450 --- /dev/null +++ b/classes/qemu.bbclass @@ -0,0 +1,27 @@ +# +# This class contains functions for recipes that need QEMU or test for its +# existance. +# + +def check_gcc3(data): + # Used by qemu to make sure we have a workable gcc-3.x. + # Start by checking for the program name as we build it as there + # are some distribtuion provided gcc-3.x's that will not work. + gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' + + for gcc3 in gcc3_versions.split(): + if check_app_exists(gcc3, data): + return gcc3 + + return False + +def qemu_target_binary(data): + import bb + + target_arch = bb.data.getVar("TARGET_ARCH", data, 1) + if target_arch in ("i486", "i586", "i686"): + target_arch = "i386" + elif target_arch == "powerpc": + target_arch = "ppc" + + return "qemu-" + target_arch diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index a78e8edf8a..5f0e724456 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -2,6 +2,8 @@ # Sanity check the users setup for common misconfigurations # +inherit qemu + def raise_sanity_error(msg): import bb bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration. @@ -95,7 +97,7 @@ def check_sanity(e): missing = missing + "gcc-3.x (needed for qemu-native)," if "qemu-native" in assume_provided: - required_utilities += "qemu" + required_utilities += " %s" % (qemu_target_binary(e.data)) try: if os.path.exists("/proc/sys/vm/mmap_min_addr"): -- cgit v1.2.3 From 7e0dca393772c8145fb8dccd1a5898bc4fb7933a Mon Sep 17 00:00:00 2001 From: Chris Conroy Date: Wed, 16 Sep 2009 07:11:14 +0000 Subject: rootfs_ipk.bbclass: move rootfs postprocess command I ran into a problem yesterday where the ROOTFS_POSTPROCESS_COMMAND started failing after I turned off ONLINE_PACKAGE_MANAGEMENT. It seems the problem is that if package management is turned off, then the opkg directory gets deleted. Subsequent opkg commands in the ROOTFS_POSTPROCESS_COMMAND fail to open the lock file because the directory is gone. This patch simply moves the postprocess command above the destruction of the opkg directory to allow any such commands to complete successfully. Acked-by: Marcin Juszkiewicz --- classes/rootfs_ipk.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index 38d6121529..3a73ed8854 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -82,6 +82,8 @@ fakeroot rootfs_ipk_do_rootfs () { install -d ${IMAGE_ROOTFS}/${sysconfdir} echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version + + ${ROOTFS_POSTPROCESS_COMMAND} if [ "${ONLINE_PACKAGE_MANAGEMENT}" != "none" ]; then if [ "${ONLINE_PACKAGE_MANAGEMENT}" == "add" ]; then @@ -99,8 +101,6 @@ fakeroot rootfs_ipk_do_rootfs () { rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg fi - ${ROOTFS_POSTPROCESS_COMMAND} - log_check rootfs rm -rf ${IPKG_TMP_DIR} } -- cgit v1.2.3 From 82c4e6b36216f2b1c31116a5c784f5e256a1a241 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 9 Nov 2009 12:11:36 +0000 Subject: kernel.bbclass: pass ${KERNEL_VERSION} to depmod -a The postinsts for kernel-image and modules run "depmod -a" on the target, but this only updates the old kernel's modules.dep. "depmod -a ${KERNEL_VERSION}" updates the files in /lib/modules/${KERNEL_VERSION}. Signed-off-by: Michael Smith Acked-by: Marcin Juszkiewicz --- classes/kernel.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 3a52a067cc..69ab422c43 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -267,7 +267,7 @@ fi if [ -n "$D" ]; then ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION} else - depmod -a + depmod -a ${KERNEL_VERSION} fi } @@ -275,7 +275,7 @@ pkg_postinst_modules () { if [ -n "$D" ]; then ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION} else - depmod -a + depmod -a ${KERNEL_VERSION} update-modules || true fi } -- cgit v1.2.3