linux.inc: use kernel decompressor (fast!) instead of uboot one (sloooooooow), closes...
authorKoen Kooi <koen@openembedded.org>
Fri, 7 Sep 2007 11:32:10 +0000 (11:32 +0000)
committerKoen Kooi <koen@openembedded.org>
Fri, 7 Sep 2007 11:32:10 +0000 (11:32 +0000)
packages/linux/linux.inc

index 8a3a36a..05bfc2f 100644 (file)
@@ -71,16 +71,21 @@ do_deploy() {
         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 vmlinux linux.bin
-            rm -f linux.bin.gz
-            gzip -9 linux.bin
-            uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
-            rm -f linux.bin.gz
-        fi
+            if test -e arch/${ARCH}/boot/compressed/vmlinux ; 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}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
+                rm -f linux.bin
+           else
+               ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+                rm -f linux.bin.gz
+                gzip -9 linux.bin
+                uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
+                rm -f linux.bin.gz
+            fi
+       fi
 }
 
 do_deploy[dirs] = "${S}"
 
-addtask prepatch before do_patch after do_unpack
 addtask deploy before do_package after do_install