summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass13
-rw-r--r--classes/corecdp-mirrors.bbclass4
-rw-r--r--classes/glibc-package.bbclass15
-rw-r--r--classes/icecc.bbclass2
-rw-r--r--classes/image.bbclass3
-rw-r--r--classes/insane.bbclass1
-rw-r--r--classes/java.bbclass2
-rw-r--r--classes/kernel.bbclass27
-rw-r--r--classes/linux-kernel-base.bbclass3
-rw-r--r--classes/native.bbclass2
-rw-r--r--classes/package_dbg.bbclass125
-rw-r--r--classes/qemu.bbclass15
-rw-r--r--classes/qmake_base.bbclass3
-rw-r--r--classes/qt4x11.bbclass2
-rw-r--r--classes/sanity.bbclass22
-rw-r--r--classes/xfce.bbclass2
16 files changed, 189 insertions, 52 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 384a67d3d6..e6cfeccc46 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1307,19 +1307,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/corecdp-mirrors.bbclass b/classes/corecdp-mirrors.bbclass
new file mode 100644
index 0000000000..0d1f0b4a7b
--- /dev/null
+++ b/classes/corecdp-mirrors.bbclass
@@ -0,0 +1,4 @@
+MIRRORS_append () {
+ftp://.*/.* http://www.multitech.net/corecdp/sources/
+https?$://.*/.* http://www.multitech.net/corecdp/sources/
+}
diff --git a/classes/glibc-package.bbclass b/classes/glibc-package.bbclass
index 413ed14931..90b9bfd584 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-dev glibc-static glibc-doc glibc-locale libcidn libmemusage libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
@@ -212,12 +214,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 +222,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/icecc.bbclass b/classes/icecc.bbclass
index 4962fcb7e6..0a22f70001 100644
--- a/classes/icecc.bbclass
+++ b/classes/icecc.bbclass
@@ -252,7 +252,7 @@ def icc_path(bb,d):
#"system" package blacklist contains a list of packages that can not distribute compile tasks
#for one reason or the other
- system_package_blacklist = [ "uclibc", "glibc", "gcc", "qemu", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman" ]
+ system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman" ]
user_package_blacklist = (bb.data.getVar('ICECC_USER_PACKAGE_BL', d) or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
diff --git a/classes/image.bbclass b/classes/image.bbclass
index ab580312bb..9dce609733 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -17,6 +17,9 @@ IMAGE_INITSCRIPTS ?= "initscripts"
#
IMAGE_LOGIN_MANAGER ?= "tinylogin"
+# set sane default for the SPLASH variable
+SPLASH ?= ""
+
IMAGE_KEEPROOTFS ?= ""
IMAGE_KEEPROOTFS[doc] = "Set to non-empty to keep ${IMAGE_ROOTFS} around after image creation."
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 495c3a53aa..804caf06ee 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -61,6 +61,7 @@ def package_qa_get_machine_dict():
"i486": ( 3, 0, 0, True, True),
"i586": ( 3, 0, 0, True, True),
"i686": ( 3, 0, 0, True, True),
+ "mips": ( 8, 0, 0, False, True),
"mipsel": ( 8, 0, 0, True, True),
"avr32": (6317, 0, 0, False, True),
"sh4": (42, 0, 0, True, True),
diff --git a/classes/java.bbclass b/classes/java.bbclass
index b68035c13e..d4cf5aa954 100644
--- a/classes/java.bbclass
+++ b/classes/java.bbclass
@@ -13,7 +13,7 @@ libdir_jni ?= ${libdir}/jni
# JVM bundle location on target
libdir_jvm ?= ${libdir}/jvm
-STAGING_DATADIR_JAVA ?= ${STAGING_DATADIR}/java
+STAGING_DATADIR_JAVA ?= ${STAGING_DIR_JAVA}
STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni
STAGING_LIBDIR_JVM ?= ${STAGING_LIBDIR}/jvm
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index edeaa660bb..83530b5a5e 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -95,13 +95,18 @@ kernel_do_compile() {
kernel_do_compile[depends] = "${INITRAMFS_TASK}"
kernel_do_stage() {
- ASMDIR=`readlink include/asm`
+ if [ -e include/asm ] ; then
+ # This link is generated only in kernel before 2.6.33-rc1, don't stage it for newer kernels
+ ASMDIR=`readlink include/asm`
- mkdir -p ${STAGING_KERNEL_DIR}/include/$ASMDIR
- cp -fR include/$ASMDIR/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
+ mkdir -p ${STAGING_KERNEL_DIR}/include/$ASMDIR
+ cp -fR include/$ASMDIR/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
+ fi
# Kernel 2.6.27 moved headers from includes/asm-${ARCH} to arch/${ARCH}/include/asm
if [ -e arch/${ARCH}/include/asm/ ] ; then
- cp -fR arch/${ARCH}/include/asm/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
+ if [ -e include/asm ] ; then
+ cp -fR arch/${ARCH}/include/asm/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
+ fi
install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}/include
cp -fR arch/${ARCH}/* ${STAGING_KERNEL_DIR}/arch/${ARCH}/
@@ -112,8 +117,10 @@ kernel_do_stage() {
cp -fR arch/x86/* ${STAGING_KERNEL_DIR}/arch/x86/
fi
- rm -f ${STAGING_KERNEL_DIR}/include/asm
- ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
+ if [ -e include/asm ] ; then
+ rm -f ${STAGING_KERNEL_DIR}/include/asm
+ ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
+ fi
mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic
cp -fR include/asm-generic/* ${STAGING_KERNEL_DIR}/include/asm-generic/
@@ -201,8 +208,12 @@ kernel_do_install() {
kernel_do_configure() {
yes '' | oe_runmake oldconfig
if [ ! -z "${INITRAMFS_IMAGE}" ]; then
- cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz" initramfs.cpio.gz
- fi
+ for img in cpio.gz cpio.lzo cpio.lzma; do
+ if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
+ fi
+ done
+ fi
}
do_menuconfig() {
diff --git a/classes/linux-kernel-base.bbclass b/classes/linux-kernel-base.bbclass
index b3e0fdad7a..510951a620 100644
--- a/classes/linux-kernel-base.bbclass
+++ b/classes/linux-kernel-base.bbclass
@@ -4,6 +4,9 @@ def get_kernelversion(p):
fn = p + '/include/linux/utsrelease.h'
if not os.path.isfile(fn):
+ # after 2.6.33-rc1
+ fn = p + '/include/generated/utsrelease.h'
+ if not os.path.isfile(fn):
fn = p + '/include/linux/version.h'
import re
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 96f9cf1a96..6698b61cfc 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -36,6 +36,8 @@ LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}"
STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}"
+STAGING_DIR_JAVA = "${STAGING_DATADIR_JAVA_NATIVE}"
+
# Don't use site files for native builds
export CONFIG_SITE = ""
diff --git a/classes/package_dbg.bbclass b/classes/package_dbg.bbclass
new file mode 100644
index 0000000000..39dceaf9b3
--- /dev/null
+++ b/classes/package_dbg.bbclass
@@ -0,0 +1,125 @@
+# package_dbg.bbclass: populate -dbg versions for each package in PACKAGES
+#
+# Copyright (c) 2009 MontaVista Software, Inc. All rights reserved.
+#
+# Released under the MIT license (see LICENSE.MIT for the terms)
+
+
+inherit package
+
+
+PACKAGE_DBG_DIRS = "${bindir} ${sbindir} \
+ ${libexecdir} ${libdir} \
+ ${base_bindir} ${base_sbindir} \
+ ${base_libdir}"
+PACKAGE_DBG_DESC = "Debugging files for %s"
+PACKAGE_DBG_EXCLUDE = "${PN}-locale* ${PN}-doc ${PN}-dev *-dbg"
+
+
+def __find(dir):
+ """ Given a directory, recurses into that directory,
+ returning all files. """
+
+ from os import walk
+ from os.path import join
+
+ for root, dirs, files in walk(dir):
+ for file in files:
+ yield join(root, file)
+
+def __package_get_files(pkg, d):
+ """ Obtains a list of files to be included in a package.
+
+ Starting from the FILES_<pkg> variable, it expands any globs in the list,
+ which removes missing files, and traverses any directories in the list.
+
+ It does *not* remove files which are also in other packages, it's left
+ to the user's discretion whether to allow overlap. """
+
+ from glob import glob
+ from os.path import join, isdir, islink
+
+ installdir = d.getVar("D", True)
+ installdirlen = len(installdir)
+
+ files = (d.getVar("FILES_%s" % pkg, True) or "").split()
+ for globbed in (glob(join(installdir, file[1:])) for file in files):
+ for path in globbed:
+ if isdir(path) and not islink(path):
+ for file in __find(path):
+ yield file[installdirlen:]
+ else:
+ yield path[installdirlen:]
+
+def add_dbg_packages(d):
+ from fnmatch import fnmatch
+
+ packages = d.getVar("PACKAGES", True).split()
+ excludes = d.getVar("PACKAGE_DBG_EXCLUDE", True).split()
+
+ for pkg in tuple(packages):
+ if any(fnmatch(pkg, excluded) for excluded in excludes):
+ continue
+
+ dbgpkg = "%s-dbg" % pkg
+ if not dbgpkg in packages:
+ packages.insert(0, dbgpkg)
+
+ d.setVar("PACKAGES", " ".join(packages))
+
+
+# Add the -dbg packages to PACKAGES
+python () {
+ from bb.data import inherits_class as inherits
+
+ # Task handles its own -dbg versions of its packages at the moment
+ if not inherits("task", d):
+ dynpkgs = d.getVar("PACKAGES_DYNAMIC", True).split()
+ dynpkgs += ["%s-dbg" % dyn for dyn in dynpkgs]
+ d.setVar("PACKAGES_DYNAMIC", " ".join(dynpkgs))
+
+ add_dbg_packages(d)
+}
+
+python populate_packages_prepend () {
+ from bb.data import inherits_class as inherits
+
+ if not inherits("task", d):
+ bb.build.exec_func("package_do_dbg", d)
+}
+
+# Populate the -dbg subpackage metadata
+python package_do_dbg() {
+ """ Populate the -dbg subpackage metadata. """
+
+ from os.path import join, basename, dirname
+
+ def setVar(key, val):
+ if d.getVar(key, val) is None:
+ d.setVar(key, val)
+
+ add_dbg_packages(d)
+ packages = d.getVar("PACKAGES", True).split()
+ desc = d.getVar("PACKAGE_DBG_DESC", True)
+ debug_dirs = d.getVar("PACKAGE_DBG_DIRS", True).split()
+
+ done = []
+ for pkgname in tuple(packages):
+ files = tuple(__package_get_files(pkgname, d))
+ dbg = [join(dirname(file), ".debug", basename(file))
+ for file in files
+ if not file in done and
+ any(file.startswith(dir) for dir in debug_dirs)]
+ done.extend(files)
+
+ if dbg:
+ setVar("FILES_%s-dbg" % pkgname, " ".join(dbg))
+ setVar("DESCRIPTION_%s-dbg" % pkgname, desc % pkgname)
+ setVar("RDEPENDS_%s-dbg" % pkgname, pkgname)
+ else:
+ try:
+ packages.remove("%s-dbg" % pkgname)
+ except ValueError:
+ pass
+ d.setVar("PACKAGES", " ".join(packages))
+}
diff --git a/classes/qemu.bbclass b/classes/qemu.bbclass
new file mode 100644
index 0000000000..66dfb2b0d2
--- /dev/null
+++ b/classes/qemu.bbclass
@@ -0,0 +1,15 @@
+#
+# This class contains functions for recipes that need QEMU or test for its
+# existance.
+#
+
+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/qmake_base.bbclass b/classes/qmake_base.bbclass
index 50d8bb53da..4fbe21f2e1 100644
--- a/classes/qmake_base.bbclass
+++ b/classes/qmake_base.bbclass
@@ -13,6 +13,9 @@ export OE_QMAKE_AR="${AR}"
export OE_QMAKE_STRIP="echo"
export OE_QMAKE_RPATH="-Wl,-rpath-link,"
+# do not export STRIP to the environment
+STRIP[unexport] = "1"
+
# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11
oe_qmake_mkspecs () {
diff --git a/classes/qt4x11.bbclass b/classes/qt4x11.bbclass
index aa2e2a174e..2d56b7e95b 100644
--- a/classes/qt4x11.bbclass
+++ b/classes/qt4x11.bbclass
@@ -1,4 +1,4 @@
-DEPENDS_prepend = "${@["qt4x11 ", ""][(bb.data.getVar('PN', d, 1)[:12] == 'qt4-x11-free')]}"
+DEPENDS_prepend = "${@["qt4-x11-free ", ""][(bb.data.getVar('PN', d, 1)[:12] == 'qt4-x11-free')]}"
inherit qmake2
diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index f65df61c1d..b6c6ed939a 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,24 +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 "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 ' '")
-
- if not check_gcc3(e.data) and gcc_version[0] != '3':
- messages = messages + "gcc3-native was in ASSUME_PROVIDED but the gcc-3.x binary can't be found in PATH"
- missing = missing + "gcc-3.x (needed for qemu-native),"
-
+ # If we'll be running qemu, perform some sanity checks
+ if data.getVar('ENABLE_BINARY_LOCALE_GENERATION', e.data, True):
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"
-
- if os.path.exists("/proc/sys/vm/mmap_min_addr"):
- f = file("/proc/sys/vm/mmap_min_addr", "r")
- if (f.read().strip() != "0"):
- messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.\n"
- f.close()
+ required_utilities += " %s" % (qemu_target_binary(e.data))
for util in required_utilities.split():
if not check_app_exists( util, e.data ):
diff --git a/classes/xfce.bbclass b/classes/xfce.bbclass
index b18313fa2a..db6329c4ad 100644
--- a/classes/xfce.bbclass
+++ b/classes/xfce.bbclass
@@ -9,7 +9,7 @@ LICENSE = "LGPLv2"
DEPENDS += "startup-notification"
XFCE_VERSION = ${PV}
-SRC_URI = "http://www.us.xfce.org/archive/xfce-${XFCE_VERSION}/src/${PN}-${PV}.tar.bz2"
+SRC_URI = "http://www.us.xfce.org/archive/xfce/${XFCE_VERSION}/src/${PN}-${PV}.tar.bz2"
inherit autotools