diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 21 | ||||
-rw-r--r-- | classes/glibc-package.bbclass | 20 | ||||
-rw-r--r-- | classes/kernel.bbclass | 4 | ||||
-rw-r--r-- | classes/mozilla.bbclass | 26 | ||||
-rw-r--r-- | classes/qemu.bbclass | 27 | ||||
-rw-r--r-- | classes/rootfs_ipk.bbclass | 4 | ||||
-rw-r--r-- | classes/sanity.bbclass | 11 |
7 files changed, 75 insertions, 38 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 990e75ee14..c083d48d85 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) @@ -1332,19 +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.4.x. - # Start by checking for the program name as we build it, was not - # all host-provided gcc-3.4's will 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 413ed14931..d47c914b36 100644 --- a/classes/glibc-package.bbclass +++ b/classes/glibc-package.bbclass @@ -7,9 +7,11 @@ # "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-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 +25,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 +38,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}" @@ -212,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" @@ -226,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/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 } 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 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/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} } diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index b66c9a9877..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. @@ -83,8 +85,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 +97,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 += " %s" % (qemu_target_binary(e.data)) try: if os.path.exists("/proc/sys/vm/mmap_min_addr"): |