summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2008-01-18 11:51:29 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2008-01-18 11:51:29 +0000
commitcb387977eadbbb2cfac43a144e04ffcecae0f008 (patch)
tree24bfd96c73274f08c6fcdb5cd8b98e23fceab196 /classes
parent1aa5072883ddc636969ab0772686de6cd21a8a62 (diff)
kernel.bbclass: added sizecheck task from linux recipe (merge from Poky)
Diffstat (limited to 'classes')
-rw-r--r--classes/kernel.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index d83ec88d44..f896492364 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -405,3 +405,17 @@ python populate_packages_prepend () {
packages.append(metapkg)
bb.data.setVar('PACKAGES', ' '.join(packages), d)
}
+
+# Support checking the kernel size since some kernels need to reside in partitions
+# with a fixed length or there is a limit in transferring the kernel to memory
+do_sizecheck() {
+ if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
+ size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'`
+ if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
+ rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
+ die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
+ fi
+ fi
+}
+
+addtask sizecheck before do_install after do_compile