diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-12-06 09:43:11 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-12-06 09:43:11 +0000 |
commit | 048754f6843b4bf0c205f25571b89ed9121977bd (patch) | |
tree | df54008a5b085f6a655ad53b960560c71ed6a515 /meta/classes/kernel.bbclass | |
parent | 7256b486f7321df10a75f9cc4bbd46e1009e074b (diff) | |
download | poky-048754f6843b4bf0c205f25571b89ed9121977bd.tar.gz |
kernel.bbclass: added task which check size of kernel image
Code was taken from linux.inc, variable with size is KERNEL_IMAGE_MAXSIZE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3314 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | meta/classes/kernel.bbclass | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 5976f42c71..320a2cf71a 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -415,3 +415,17 @@ python populate_packages_prepend () { | |||
415 | packages.append(metapkg) | 415 | packages.append(metapkg) |
416 | bb.data.setVar('PACKAGES', ' '.join(packages), d) | 416 | bb.data.setVar('PACKAGES', ' '.join(packages), d) |
417 | } | 417 | } |
418 | |||
419 | # Support checking the kernel size since some kernels need to reside in partitions | ||
420 | # with a fixed length or there is a limit in transferring the kernel to memory | ||
421 | do_sizecheck() { | ||
422 | if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then | ||
423 | size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'` | ||
424 | if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then | ||
425 | rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | ||
426 | 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." | ||
427 | fi | ||
428 | fi | ||
429 | } | ||
430 | |||
431 | addtask sizecheck before do_install after do_compile | ||