summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/distutils.bbclass11
-rw-r--r--classes/image.bbclass2
-rw-r--r--classes/nslu2-image.bbclass14
-rw-r--r--classes/rm_work.bbclass9
-rw-r--r--classes/rootfs_ipk.bbclass1
-rw-r--r--classes/seppuku.bbclass26
-rw-r--r--classes/sip.bbclass14
-rw-r--r--classes/sip3.bbclass (renamed from classes/sip4.bbclass)16
-rw-r--r--classes/task.bbclass27
-rw-r--r--classes/tinderclient.bbclass7
-rw-r--r--classes/xilinx-bsp.bbclass53
11 files changed, 141 insertions, 39 deletions
diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass
index d23c2a3b2e..c07a9911cd 100644
--- a/classes/distutils.bbclass
+++ b/classes/distutils.bbclass
@@ -9,7 +9,15 @@ distutils_do_compile() {
distutils_stage_headers() {
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install_headers --install-dir=${STAGING_INCDIR}/${PYTHON_DIR} || \
- oefatal "python setup.py install execution failed."
+ oefatal "python setup.py install_headers execution failed."
+}
+
+distutils_stage_all() {
+ install -d ${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages
+ PYTHONPATH=${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages \
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+ ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${STAGING_INCDIR}/.. --install-data=${STAGING_INCDIR}/../share || \
+ oefatal "python setup.py install (stage) execution failed."
}
distutils_do_install() {
@@ -35,6 +43,7 @@ distutils_do_install() {
done
fi
+ rm -f ${D}${libdir}/${PYTHON_DIR}/site-packages/easy-install.pth
}
EXPORT_FUNCTIONS do_compile do_install
diff --git a/classes/image.bbclass b/classes/image.bbclass
index 248ccab60b..91e63262cd 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -69,9 +69,9 @@ do_build[nostamp] = "1"
fakeroot do_rootfs () {
set -x
rm -rf ${IMAGE_ROOTFS}
+ mkdir -p ${IMAGE_ROOTFS}
if [ "${USE_DEVFS}" != "1" ]; then
- mkdir -p ${IMAGE_ROOTFS}/dev
for devtable in ${@get_devtable_list(d)}; do
makedevs -r ${IMAGE_ROOTFS} -D $devtable
done
diff --git a/classes/nslu2-image.bbclass b/classes/nslu2-image.bbclass
index a06c1d1468..edd23ae07f 100644
--- a/classes/nslu2-image.bbclass
+++ b/classes/nslu2-image.bbclass
@@ -3,21 +3,23 @@ nslu2_pack_image () {
install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/RedBoot \
${STAGING_LIBDIR}/nslu2-binaries/Trailer \
${STAGING_LIBDIR}/nslu2-binaries/SysConf \
+ ${STAGING_LOADER_DIR}/apex-nslu2.bin \
+ ${STAGING_LOADER_DIR}/apex-nslu2-16mb.bin \
${DEPLOY_DIR_IMAGE}/slug/
- install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-nslu2${SITEINFO_ENDIANESS} \
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-ixp4xx${SITEINFO_ENDIANESS} \
${DEPLOY_DIR_IMAGE}/slug/vmlinuz
install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
${DEPLOY_DIR_IMAGE}/slug/flashdisk.jffs2
install -m 0644 ${STAGING_FIRMWARE_DIR}/NPE-B ${DEPLOY_DIR_IMAGE}/slug/
cd ${DEPLOY_DIR_IMAGE}/slug
- slugimage -p -b RedBoot -s SysConf -k vmlinuz \
- -r Ramdisk:1,Flashdisk:flashdisk.jffs2 -m NPE-B -t Trailer \
+ slugimage -p -b RedBoot -s SysConf -k vmlinuz -L apex-nslu2.bin \
+ -r Flashdisk:flashdisk.jffs2 -m NPE-B -t Trailer \
-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-nslu2.bin
- slugimage -F -p -b RedBoot -s SysConf -k vmlinuz \
- -r Ramdisk:1,Flashdisk:flashdisk.jffs2 -m NPE-B -t Trailer \
+ slugimage -F -p -b RedBoot -s SysConf -k vmlinuz -L apex-nslu2-16mb.bin \
+ -r Flashdisk:flashdisk.jffs2 -m NPE-B -t Trailer \
-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-nslu2-16mb.bin
rm -rf ${DEPLOY_DIR_IMAGE}/slug
}
-EXTRA_IMAGEDEPENDS_nslu2 += 'slugimage-native nslu2-linksys-firmware ixp4xx-npe upslug2-native'
+EXTRA_IMAGEDEPENDS_nslu2 += 'slugimage-native nslu2-linksys-firmware ixp4xx-npe upslug2-native apex-nslu2 apex-nslu2-16mb'
IMAGE_POSTPROCESS_COMMAND_nslu2 += "nslu2_pack_image; "
diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass
index 0f613b7a95..45812bbb81 100644
--- a/classes/rm_work.bbclass
+++ b/classes/rm_work.bbclass
@@ -7,7 +7,7 @@
#
RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
-BB_DEFAULT_TASK = "rm_work"
+BB_DEFAULT_TASK = "rm_work_all"
do_rm_work () {
cd ${WORKDIR}
@@ -23,4 +23,9 @@ do_rm_work () {
# Uncomment me when we can use bitbake 1.8.8
#addtask rm_work after do_${RMWORK_ORIG_TASK}
addtask rm_work after do_build
-do_rm_work[recrdeptask] = "do_rm_work"
+
+do_rm_work_all () {
+ :
+}
+do_rm_work_all[recrdeptask] = "do_rm_work"
+addtask rm_work_all after do_rm_work
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 75c85e8f3d..53b0162eac 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -37,7 +37,6 @@ fakeroot rootfs_ipk_do_rootfs () {
rootfs_ipk_do_indexes
- mkdir -p ${IMAGE_ROOTFS}/dev
mkdir -p ${T}
#Add deploy/ipk as well for backward compat
diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass
index 7e4b2098be..101f621303 100644
--- a/classes/seppuku.bbclass
+++ b/classes/seppuku.bbclass
@@ -129,7 +129,9 @@ def seppuku_find_bug_report(debug_file, opener, query, product, component, bugna
component = urllib.quote(component)
bugname = urllib.quote(bugname)
- result = opener.open("%(query)sproduct=%(product)s&component=%(component)s&short_desc_type=substring&short_desc=%(bugname)s" % vars())
+ file = "%(query)sproduct=%(product)s&component=%(component)s&short_desc_type=substring&short_desc=%(bugname)s" % vars()
+ print >> debug_file, "Trying %s" % file
+ result = opener.open(file)
if result.code != 200:
raise "Can not query the bugzilla at all"
txt = result.read()
@@ -290,7 +292,7 @@ python seppuku_eventhandler() {
if name == "PkgFailed":
if not bb.data.getVar('SEPPUKU_AUTOBUILD', data, True) == "0":
build.exec_task('do_clean', data)
- elif name == "TaskFailed" or name == "NoProvider":
+ elif name == "TaskFailed":
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
poster = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj),MultipartPostHandler.MultipartPostHandler)
@@ -326,9 +328,6 @@ python seppuku_eventhandler() {
file = open(log_file[0], 'r')
else:
print >> debug_file, "No log file found for the glob"
- #elif name == "NoProvider":
- # bugname = "noprovider for %s " % (event.getItem)
- # text = "Please fix it"
else:
print >> debug_file, "Unknown name '%s'" % name
assert False
@@ -336,16 +335,23 @@ python seppuku_eventhandler() {
(bug_open, bug_number) = seppuku_find_bug_report(debug_file, opener, query, product, component, bugname)
print >> debug_file, "Bug is open: %s and bug number: %s" % (bug_open, bug_number)
- # The bug is present and still open, no need to attach an error log
+ # The bug is present and still open, attach an error log
if bug_number and bug_open:
print >> debug_file, "The bug is known as '%s'" % bug_number
+ if file:
+ if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file):
+ print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number
+ else:
+ print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number)
+ else:
+ print >> debug_file, "Not trying to create an attachment for bug #%s" % bug_number
return NotHandled
if bug_number and not bug_open:
if not seppuku_reopen_bug(poster, reopen, product, component, bug_number, bugname, text):
- print >> debug_file, "Failed to reopen the bug report"
+ print >> debug_file, "Failed to reopen the bug #%s" % bug_number
else:
- print >> debug_file, "Reopened the bug report"
+ print >> debug_file, "Reopened the bug #%s" % bug_number
else:
bug_number = seppuku_file_bug(poster, newbug, product, component, bugname, text)
if not bug_number:
@@ -355,11 +361,11 @@ python seppuku_eventhandler() {
if bug_number and file:
if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file):
- print >> debug_file, "Failed to attach the build log"
+ print >> debug_file, "Failed to attach the build log for bug #%" % bug_number
else:
print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number)
else:
- print >> debug_file, "Not trying to create an attachment"
+ print >> debug_file, "Not trying to create an attachment for bug #%" % bug_number
return NotHandled
}
diff --git a/classes/sip.bbclass b/classes/sip.bbclass
index adf179b130..a258fda629 100644
--- a/classes/sip.bbclass
+++ b/classes/sip.bbclass
@@ -1,11 +1,11 @@
# Build Class for Sip based Python Bindings
# (C) Michael 'Mickey' Lauer <mickey@Vanille.de>
#
-
-DEPENDS =+ "sip-native python-sip"
+DEPENDS =+ "sip-native"
+RDEPENDS += "python-sip"
# default stuff, do not uncomment
-# EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1"
+# EXTRA_SIPTAGS = "-tWS_X11 -tQt_4_3_0"
sip_do_generate() {
if [ -z "${SIP_MODULES}" ]; then
@@ -33,10 +33,10 @@ sip_do_generate() {
for module in $MODULES
do
- install -d ${module}/
- oenote "calling 'sip -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'"
- sip -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf sip/${module}/${module}mod.sip \
- || die "Error calling sip on ${module}"
+ install -d ${module}/
+ echo "calling 'sip4 -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'"
+ sip4 -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf \
+ sip/${module}/${module}mod.sip || die "Error calling sip on ${module}"
cat ${module}/${module}.sbf | sed s,target,TARGET, \
| sed s,sources,SOURCES, \
| sed s,headers,HEADERS, \
diff --git a/classes/sip4.bbclass b/classes/sip3.bbclass
index ca2b1dae20..1dd42ba86b 100644
--- a/classes/sip4.bbclass
+++ b/classes/sip3.bbclass
@@ -1,13 +1,13 @@
# Build Class for Sip based Python Bindings
# (C) Michael 'Mickey' Lauer <mickey@Vanille.de>
#
-DEPENDS =+ "sip4-native"
-RDEPENDS += "python-sip4"
+
+DEPENDS =+ "sip-native python-sip"
# default stuff, do not uncomment
-# EXTRA_SIPTAGS = "-tWS_X11 -tQt_4_1_1"
+# EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1"
-sip4_do_generate() {
+sip3_do_generate() {
if [ -z "${SIP_MODULES}" ]; then
MODULES="`ls sip/*mod.sip`"
else
@@ -33,10 +33,10 @@ sip4_do_generate() {
for module in $MODULES
do
- install -d ${module}/
- echo "calling 'sip4 -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'"
- sip4 -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf \
- sip/${module}/${module}mod.sip || die "Error calling sip on ${module}"
+ install -d ${module}/
+ oenote "calling 'sip -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'"
+ sip -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf sip/${module}/${module}mod.sip \
+ || die "Error calling sip on ${module}"
cat ${module}/${module}.sbf | sed s,target,TARGET, \
| sed s,sources,SOURCES, \
| sed s,headers,HEADERS, \
diff --git a/classes/task.bbclass b/classes/task.bbclass
new file mode 100644
index 0000000000..4edd704829
--- /dev/null
+++ b/classes/task.bbclass
@@ -0,0 +1,27 @@
+# Task packages are only used to pull in other packages
+# via their dependencies. They are empty.
+ALLOW_EMPTY = "1"
+
+# By default, only the task package itself is in PACKAGES.
+# -dbg and -dev flavours are handled by the anonfunc below.
+# This means that task recipes used to build multiple task
+# packages have to modify PACKAGES after inheriting task.bbclass.
+PACKAGES = "${PN}"
+
+# By default, task packages do not depend on a certain architecture.
+# Only if dependencies are modified by MACHINE_FEATURES, packages
+# need to be set to MACHINE_ARCH after inheriting task.bbclass
+PACKAGE_ARCH = "all"
+
+# This automatically adds -dbg and -dev flavours of all PACKAGES
+# to the list. Their dependencies (RRECOMMENDS) are handled as usual
+# by package_depchains in a following step.
+python () {
+ packages = bb.data.getVar('PACKAGES', d, 1).split()
+ genpackages = []
+ for pkg in packages:
+ for postfix in ['-dbg', '-dev']:
+ genpackages.append(pkg+postfix)
+ bb.data.setVar('PACKAGES', ' '.join(packages+genpackages), d)
+}
+
diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass
index d1d9f49fac..bc004efb26 100644
--- a/classes/tinderclient.bbclass
+++ b/classes/tinderclient.bbclass
@@ -24,6 +24,7 @@ def tinder_form_data(bound, dict, log):
output = []
# for each key in the dictionary
for name in dict:
+ assert dict[name]
output.append( "--" + bound )
output.append( 'Content-Disposition: form-data; name="%s"' % name )
output.append( "" )
@@ -60,7 +61,7 @@ def tinder_format_http_post(d,status,log):
"os" : os.uname()[0],
"os_version" : os.uname()[2],
"compiler" : "gcc",
- "clobber" : data.getVar('TINDER_CLOBBER', d, True),
+ "clobber" : data.getVar('TINDER_CLOBBER', d, True) or "0",
"srcdate" : data.getVar('SRCDATE', d, True),
"PN" : data.getVar('PN', d, True),
"PV" : data.getVar('PV', d, True),
@@ -370,9 +371,9 @@ def tinder_do_tinder_report(event):
addhandler tinderclient_eventhandler
python tinderclient_eventhandler() {
from bb import note, error, data
- from bb.event import NotHandled
+ from bb.event import NotHandled, getName
- if e.data is None:
+ if e.data is None or getName(e) == "MsgNote":
return NotHandled
do_tinder_report = data.getVar('TINDER_REPORT', e.data, True)
diff --git a/classes/xilinx-bsp.bbclass b/classes/xilinx-bsp.bbclass
new file mode 100644
index 0000000000..fd09946061
--- /dev/null
+++ b/classes/xilinx-bsp.bbclass
@@ -0,0 +1,53 @@
+# Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+#
+#This class handles all the intricasies of getting the required files from the
+#ISE/EDK/project to the kernel and prepare the kernel for compilation.
+#The Xilinx EDK supports 2 different architectures : PowerPC (ppc 405) and Microblaze
+#Only the PowerPC BSP has been tested so far
+#For this to work correctly you need to add XILINX_BSP_PATH and XILINX_BOARD to your
+#local.conf
+#XILINX_BSP_PATH should have the complete path to your project dir
+#XILINX_BOARD should have the board type i.e ML403
+#
+#Currently supported boards
+#Xilinx ML403
+#More to come soon ;)
+
+do_configure_prepend() {
+
+
+#first check that the XILINX_BSP_PATH and XILINX_BOARD have been defined in local.conf
+if [ -z "${XILINX_BSP_PATH}" ]; then
+ oefatal "XILINX_BSP_PATH not defined ! Exiting..."
+ exit 1
+
+else
+ if [ -z "${XILINX_BOARD}" ]; then
+ oefatal "XILINX_BOARD not defined ! Exiting"
+ exit 1
+ fi
+
+fi
+#now depending on the board type and arch do what is nessesary
+
+case "${XILINX_BOARD}" in
+ ML403)
+ oenote "ML403 board setup"
+ cp -a ${XILINX_BSP_PATH}/ppc405_0/libsrc/linux_2_6_v1_00_a/linux/arch/ppc/platforms/4xx/xparameters/xparameters_ml40x.h \
+ ${S}/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h
+ ;;
+
+ * )
+ oefatal "! Unknow Xilinx board ! Exiting..."
+ exit 1
+ ;;
+esac
+
+
+}
+
+
+
+
+