aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-06-30 22:07:04 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-06-30 22:07:04 +0000
commitd4f7af436d07c7bc4dd61ac45bff3414a1c12c74 (patch)
tree049f5903fea26153466932a6b271c49f10b75ba8 /classes
parent873ce28c40814edb45f534003450318c6e9b2650 (diff)
parent7339a83b4095582728045cee92aa215373607caf (diff)
downloadopenembedded-d4f7af436d07c7bc4dd61ac45bff3414a1c12c74.tar.gz
openembedded-d4f7af436d07c7bc4dd61ac45bff3414a1c12c74.tar.bz2
openembedded-d4f7af436d07c7bc4dd61ac45bff3414a1c12c74.zip
merge of '08199c52a592fe71e2675200cf618a439d710884'
and '3e5f187370604cf4577025ebc49d90ca52a72d4d'
Diffstat (limited to 'classes')
-rw-r--r--classes/cmake.bbclass3
-rw-r--r--classes/cross.bbclass4
-rw-r--r--classes/image.bbclass1
-rw-r--r--classes/insane.bbclass3
-rw-r--r--classes/java.bbclass7
-rw-r--r--classes/kernel-arch.bbclass6
-rw-r--r--classes/kernel.bbclass40
-rw-r--r--classes/opie.bbclass1
-rw-r--r--classes/packaged-staging.bbclass3
-rw-r--r--classes/palmtop.bbclass1
-rw-r--r--classes/rm_work.bbclass6
-rw-r--r--classes/rootfs_ipk.bbclass2
-rw-r--r--classes/siteinfo.bbclass1
-rw-r--r--classes/src_distribute.bbclass51
14 files changed, 75 insertions, 54 deletions
diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass
index 823635c24d..a9130f2a05 100644
--- a/classes/cmake.bbclass
+++ b/classes/cmake.bbclass
@@ -4,7 +4,8 @@ DEPENDS += " cmake-native "
inherit autotools
cmake_do_configure() {
- cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
+ cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -Wno-dev \
+ -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST}
}
EXPORT_FUNCTIONS do_configure
diff --git a/classes/cross.bbclass b/classes/cross.bbclass
index 89cb3e9569..a35f4dfb79 100644
--- a/classes/cross.bbclass
+++ b/classes/cross.bbclass
@@ -49,8 +49,8 @@ bindir = "${exec_prefix}/bin"
sbindir = "${exec_prefix}/bin"
libexecdir = "${exec_prefix}/libexec"
libdir = "${exec_prefix}/lib"
-includedir = "${exec_prefix}/include"
-oldincludedir = "${exec_prefix}/include"
+includedir = "${STAGING_DIR_TARGET}/${layout_includedir}"
+oldincludedir = "${STAGING_DIR_TARGET}/${layout_includedir}"
do_stage () {
oe_runmake install
diff --git a/classes/image.bbclass b/classes/image.bbclass
index 6350a733e8..e9c0ecd947 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -93,6 +93,7 @@ fakeroot do_rootfs () {
set -x
rm -rf ${IMAGE_ROOTFS}
mkdir -p ${IMAGE_ROOTFS}
+ mkdir -p ${DEPLOY_DIR_IMAGE}
if [ "${USE_DEVFS}" != "1" ]; then
for devtable in ${@get_devtable_list(d)}; do
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 1f7c761b47..a599689e8c 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -72,6 +72,9 @@ def package_qa_get_machine_dict():
"arm" : (40, 0, 0, True, True),
"armeb" : (40, 0, 0, False, True),
},
+ "linux-gnuspe" : {
+ "powerpc": (20, 0, 0, False, True),
+ },
}
diff --git a/classes/java.bbclass b/classes/java.bbclass
index e51b0d71da..17f833ce3d 100644
--- a/classes/java.bbclass
+++ b/classes/java.bbclass
@@ -1,5 +1,8 @@
# Defines the commonly used target directories and provides a convenience
# function to install jar files.
+#
+# All the default directory locations herein resemble locations chosen in
+# the Debian distribution.
# Jar location on target
datadir_java ?= ${datadir}/java
@@ -7,8 +10,12 @@ datadir_java ?= ${datadir}/java
# JNI library location on target
libdir_jni ?= ${libdir}/jni
+# JVM bundle location on target
+libdir_jvm ?= ${libdir}/jvm
+
STAGING_DATADIR_JAVA ?= ${STAGING_DATADIR}/java
STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni
+STAGING_LIBDIR_JVM ?= ${STAGING_LIBDIR}/jvm
oe_jarinstall() {
# Purpose: Install a jar file and create all the given symlinks to it.
diff --git a/classes/kernel-arch.bbclass b/classes/kernel-arch.bbclass
index 2ce0f9727d..65d220063e 100644
--- a/classes/kernel-arch.bbclass
+++ b/classes/kernel-arch.bbclass
@@ -32,8 +32,10 @@ def map_kernel_arch(a, d):
export ARCH = "${@map_kernel_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}"
def map_uboot_arch(a, d):
- if a == "powerpc":
- return "ppc"
+ import re
+
+ if re.match('powerpc$', a): return 'ppc'
+ elif re.match('i.86$', a): return 'x86'
return a
export UBOOT_ARCH = "${@map_uboot_arch(bb.data.getVar('ARCH', d, 1), d)}"
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index a7d34ca476..5085d9cabd 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -16,8 +16,15 @@ python __anonymous () {
depends = bb.data.getVar("DEPENDS", d, 1)
depends = "%s u-boot-mkimage-openmoko-native" % depends
bb.data.setVar("DEPENDS", depends, d)
+
+ image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
+ if image != '' and image is not None:
+ bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
}
+INITRAMFS_IMAGE ?= ""
+INITRAMFS_TASK ?= ""
+
inherit kernel-arch
PACKAGES_DYNAMIC += "kernel-module-*"
@@ -79,21 +86,28 @@ kernel_do_compile() {
fi
}
-INITRAMFS_SYMLINK_NAME ?= "initramfs-${MACHINE}"
-INITRAMFS_IMAGE_TARGET ?= "initramfs-image"
do_builtin_initramfs() {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
- cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_SYMLINK_NAME}" usr/initramfs_data.cpio.gz
- oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0644 ${KERNEL_OUTPUT} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}-initramfs.bin
- # Make sure to kill injected initramfs, in case someone will do "-c compile -f"
- rm usr/initramfs_data.cpio.gz
+ if [ ! -z "${INITRAMFS_IMAGE}" ]; then
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz" usr/initramfs_data.cpio.gz
+ oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}-${INITRAMFS_IMAGE}.bin
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}-${INITRAMFS_IMAGE}.bin
+
+ # Make sure to kill injected initramfs, in case someone will do "-c compile -f"
+ rm usr/initramfs_data.cpio.gz
+
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${KERNEL_IMAGE_SYMLINK_NAME}-${INITRAMFS_IMAGE}.bin
+ ln -sf ${KERNEL_IMAGE_BASE_NAME}-${INITRAMFS_IMAGE}.bin ${KERNEL_IMAGE_SYMLINK_NAME}-${INITRAMFS_IMAGE}.bin
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_SYMLINK_NAME}-${INITRAMFS_IMAGE}.bin
+ fi
}
-#addtask builtin_initramfs after do_compile
-#do_builtin_initramfs[nostamp] = "1"
-#do_builtin_initramfs[depends] = "${INITRAMFS_IMAGE_TARGET}:do_rootfs"
+addtask builtin_initramfs before do_build after do_package_write
+do_builtin_initramfs[depends] = '${INITRAMFS_TASK}'
kernel_do_stage() {
ASMDIR=`readlink include/asm`
@@ -148,6 +162,8 @@ kernel_do_stage() {
install -m 0644 arch/x86/Makefile* ${STAGING_KERNEL_DIR}/arch/x86
fi
cp -fR include/config* ${STAGING_KERNEL_DIR}/include/
+ # Install kernel images and system.map to staging
+ [ -e vmlinux ] && install -m 0644 vmlinux ${STAGING_KERNEL_DIR}/
install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}
install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION}
[ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/
diff --git a/classes/opie.bbclass b/classes/opie.bbclass
index 6324dbf522..bd1bbaf578 100644
--- a/classes/opie.bbclass
+++ b/classes/opie.bbclass
@@ -22,7 +22,6 @@ DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2
# to be consistent, put all targets into workdir
# NOTE: leave one space at the end, other files are expecting that
EXTRA_QMAKEVARS_POST += " DESTDIR=${S} "
-EXTRA_QMAKEVARS_POST += " DEFINES+=OPIE_BINDIR='\"${bindir}\"' DEFINES+=OPIE_LIBDIR='\"${libdir}/opie/lib\"' DEFINES+=OPIE_QTDIR='\"${libdir}/opie\"' "
# Opie standard TAG value
TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}"
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index 0dd6900d77..5de5970880 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -190,7 +190,8 @@ python packagestage_scenefunc () {
#
# Install the staging package somewhere temporarily so we can extract the stamp files
#
- cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -force-depends -f ${PSTAGE_MACHCONFIG} -o ${WORKDIR}/tstage install", d)
+ bb.mkdirhier(bb.data.expand("${WORKDIR}/tstage/${layout_libdir}/opkg/info/ ", d))
+ cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -f ${PSTAGE_MACHCONFIG} -force-depends -o ${WORKDIR}/tstage install", d)
ret = os.system("PATH=\"%s\" %s %s" % (path, cmd, stagepkg))
if ret != 0:
bb.fatal("Couldn't install the staging package to a temp directory")
diff --git a/classes/palmtop.bbclass b/classes/palmtop.bbclass
index fa25d598e9..b4ee62c2a3 100644
--- a/classes/palmtop.bbclass
+++ b/classes/palmtop.bbclass
@@ -17,6 +17,7 @@ EXTRA_QMAKEVARS_POST += '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "ye
EXTRA_QMAKEVARS_POST += "${@["LIBS+=-lqpe ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}"
DEPENDS_prepend = "${@["virtual/libqpe1 uicmoc-native ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}"
QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte", d)}'
+EXTRA_QMAKEVARS_POST += " DEFINES+=OPIE_BINDIR='\"${bindir}\"' DEFINES+=OPIE_LIBDIR='\"${libdir}/opie/lib\"' DEFINES+=OPIE_QTDIR='\"${libdir}/opie\"' "
PACKAGES = "${PN}-dbg ${PN}-dev ${PN} ${PN}-doc ${PN}-locale"
FILES_${PN} += " ${palmtopdir} "
diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass
index 917fadd750..094f9167bb 100644
--- a/classes/rm_work.bbclass
+++ b/classes/rm_work.bbclass
@@ -17,8 +17,10 @@ do_rm_work () {
cd ${WORKDIR}
for dir in *
do
- if [ `basename ${S}` = $dir ]; then
- rm -rf $dir
+ if [ `basename ${dir}` = "temp" ]; then
+ echo "Not removing temp"
+ else
+ echo "Removing $dir" ; rm $dir -rf
fi
done
}
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 02c5e691fc..889ace2e99 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -20,7 +20,7 @@ fakeroot rootfs_ipk_do_rootfs () {
package_generate_ipkg_conf
mkdir -p ${T}
-
+ mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg/
opkg-cl ${IPKG_ARGS} update
# Uclibc builds don't provide this stuff...
diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass
index 0d31be4dc4..039afbbee1 100644
--- a/classes/siteinfo.bbclass
+++ b/classes/siteinfo.bbclass
@@ -47,6 +47,7 @@ def get_siteinfo_list(d):
"powerpc-darwin": "endian-big bit-32 common-darwin",\
"ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\
"powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\
+ "powerpc-linux-gnuspe": "endian-big bit-32 common-linux common-glibc powerpc-common",\
"powerpc-linux-uclibc": "endian-big bit-32 common-linux common-uclibc powerpc-common",\
"sh3-linux": "endian-little bit-32 common-linux common-glibc sh-common",\
"sh4-linux": "endian-little bit-32 common-linux common-glibc sh-common",\
diff --git a/classes/src_distribute.bbclass b/classes/src_distribute.bbclass
index 5daf526018..f20410d0bb 100644
--- a/classes/src_distribute.bbclass
+++ b/classes/src_distribute.bbclass
@@ -1,40 +1,27 @@
-include conf/licenses.conf
-
SRC_DISTRIBUTECOMMAND[func] = "1"
python do_distribute_sources () {
l = bb.data.createCopy(d)
bb.data.update_data(l)
- licenses = (bb.data.getVar('LICENSE', d, 1) or "").split()
- if not licenses:
- bb.note("LICENSE not defined")
- src_distribute_licenses = (bb.data.getVar('SRC_DISTRIBUTE_LICENSES', d, 1) or "").split()
- # Explanation:
- # Space seperated items in LICENSE must *all* be distributable
- # Each space seperated item may be used under any number of | seperated licenses.
- # If any of those | seperated licenses are distributable, then that component is.
- # i.e. LICENSE = "GPL LGPL"
- # In this case, both components are distributable.
- # LICENSE = "GPL|QPL|Proprietary"
- # In this case, GPL is distributable, so the component is.
- valid = 1
- for l in licenses:
- lvalid = 0
- for i in l.split("|"):
- if i in src_distribute_licenses:
- lvalid = 1
- if lvalid != 1:
- valid = 0
- if valid == 0:
- bb.note("Licenses (%s) are not all listed in SRC_DISTRIBUTE_LICENSES, skipping source distribution" % licenses)
- return
+ licenses = (bb.data.getVar('LICENSE', d, 1) or "unknown").split()
+
+ sources_dir = bb.data.getVar('SRC_DISTRIBUTEDIR', d, 1)
import re
- for s in (bb.data.getVar('A', d, 1) or "").split():
- s = re.sub(';.*$', '', s)
- cmd = bb.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1)
- if not cmd:
- raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined")
- bb.data.setVar('SRC', s, d)
- bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d)
+ for license in licenses:
+ for entry in license.split("|"):
+ for s in (bb.data.getVar('A', d, 1) or "").split():
+ s = re.sub(';.*$', '', s)
+ cmd = bb.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1)
+ if not cmd:
+ raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined")
+ bb.data.setVar('SRC', s, d)
+ bb.data.setVar('SRC_DISTRIBUTEDIR', "%s/%s" % (sources_dir, entry), d)
+ bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d)
}
addtask distribute_sources before do_build after do_fetch
+
+addtask distsrcall after do_distribute_sources
+do_distall[recrdeptask] = "do_distribute_sources"
+base_do_distsrcall() {
+ :
+}