summaryrefslogtreecommitdiff
path: root/packages/linux/gumstix-linux.inc
diff options
context:
space:
mode:
authorPhilip Balister <philip@balister.org>2008-07-28 21:05:47 +0000
committerPhilip Balister <philip@balister.org>2008-07-28 21:05:47 +0000
commit41208550e07ec9ef62c7b580efede4733a3a1d3a (patch)
tree7be38324be9145db1dc3274e97a6c2656fd1ce88 /packages/linux/gumstix-linux.inc
parent3f78c76c7d544013b051f30566e8a8d626b53da8 (diff)
gumstix-kernel : Update from gumstix svn so kernel builds again.
Diffstat (limited to 'packages/linux/gumstix-linux.inc')
-rw-r--r--packages/linux/gumstix-linux.inc31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/linux/gumstix-linux.inc b/packages/linux/gumstix-linux.inc
index 76fd15d95a..50111cb545 100644
--- a/packages/linux/gumstix-linux.inc
+++ b/packages/linux/gumstix-linux.inc
@@ -9,7 +9,10 @@ DEPENDS += " \
u-boot-mkimage-openmoko-native \
"
+KERNEL_IMAGE_BASE_NAME = ${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}
+
S = "${WORKDIR}/linux-${PV}"
+do_deploy[dirs] = "${S}"
do_configure_prepend() {
echo "" > ${S}/.config
@@ -32,6 +35,16 @@ do_configure_prepend() {
yes '' | oe_runmake oldconfig
}
+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) is too big for your device. Please reduce the size of the kernel by making more of it modular."
+ fi
+ fi
+}
+
do_install_prepend() {
if test -e arch/${ARCH}/boot/Image ; then
ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage
@@ -41,3 +54,21 @@ do_install_prepend() {
ln -f arch/${ARCH}/boot/images/uImage arch/${ARCH}/boot/uImage
fi
}
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
+ tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib
+
+ if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
+ ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+ uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
+ rm -f linux.bin
+
+ fi
+}
+
+addtask sizecheck before do_install after do_compile
+addtask deploy before do_package after do_install
+
+