All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Subject: [PATCH 3/5] kernel.bbclass: move uImage handling to separate task
Date: Sun, 18 Sep 2011 02:18:15 +0400	[thread overview]
Message-ID: <1316297897-698-3-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1316297897-698-1-git-send-email-dbaryshkov@gmail.com>

As per org.oe.dev and meta-oe's kernel.bbclass move uImage creation to
separate task from do_deploy. The only major feature of oe-core's
version (not to recreate uImage if it exists) is retained in this patch.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 meta/classes/kernel.bbclass |   40 ++++++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index b44e3b5..6ff4018 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -486,6 +486,30 @@ do_sizecheck() {
 
 addtask sizecheck before do_install after do_compile
 
+do_uboot_mkimage() {
+    if test "x${KERNEL_IMAGETYPE}" = "xuImage" -a \
+            ! -e arch/${ARCH}/boot/uImage ; then
+        ENTRYPOINT=${UBOOT_ENTRYPOINT}
+        if test -n "${UBOOT_ENTRYSYMBOL}"; then
+            ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
+                   awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+        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 ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage
+            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 ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+            rm -f linux.bin.gz
+        fi
+    fi
+}
+
+addtask uboot_mkimage before do_install after do_compile
+
 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
 # Don't include the DATETIME variable in the sstate package signatures
 KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
@@ -497,22 +521,6 @@ kernel_do_deploy() {
 		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
 	fi
 
-	if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
-		if test -e arch/${ARCH}/boot/uImage ; then
-			cp arch/${ARCH}/boot/uImage ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-		elif 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 ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.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 ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-			rm -f linux.bin.gz
-		fi
-	fi
-
 	cd ${DEPLOYDIR}
 	rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
 	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
-- 
1.7.2.5




  parent reply	other threads:[~2011-09-17 22:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-17 22:18 [PATCH 1/5] kernel.bbclass: blacklist 'perf-dbg' as well for the modules metapackage Dmitry Eremin-Solenikov
2011-09-17 22:18 ` [PATCH 2/5] kernel.bbclass: respect MACHINE_KERNEL_PR Dmitry Eremin-Solenikov
2011-09-17 22:24   ` Otavio Salvador
2011-09-27 13:52   ` Bruce Ashfield
2011-09-27 23:40     ` Koen Kooi
2011-09-28 14:54       ` Richard Purdie
2011-09-28 18:42         ` Koen Kooi
2011-09-28 18:50           ` Dmitry Eremin-Solenikov
2011-09-28 19:50           ` Richard Purdie
2011-09-28 20:04             ` Otavio Salvador
2011-10-20  6:23               ` Koen Kooi
2011-10-20 11:21                 ` Richard Purdie
2011-10-20 11:29                   ` Koen Kooi
2011-10-20 11:35                     ` Otavio Salvador
2011-10-20 11:53                     ` Frans Meulenbroeks
2011-10-20 12:38                     ` Richard Purdie
2011-10-20 12:54                       ` Koen Kooi
2011-10-20 13:02                         ` Otavio Salvador
2011-10-21 12:05                           ` Koen Kooi
2011-10-20 13:56                         ` Richard Purdie
2011-09-17 22:18 ` Dmitry Eremin-Solenikov [this message]
2011-09-17 22:25   ` [PATCH 3/5] kernel.bbclass: move uImage handling to separate task Otavio Salvador
2011-09-21 13:09     ` Dmitry Eremin-Solenikov
2011-09-27 13:39   ` Bruce Ashfield
2011-09-17 22:18 ` [PATCH 4/5] kernel.bbclass: handle .cis firmware Dmitry Eremin-Solenikov
2011-09-27 13:40   ` Bruce Ashfield
2011-09-28 14:50   ` Richard Purdie
2011-09-17 22:18 ` [PATCH 5/5] kernel.bbclass: remove unshipped files in do_install Dmitry Eremin-Solenikov
2011-09-27 13:41   ` Bruce Ashfield
2011-09-28 14:50   ` Richard Purdie
2011-09-17 22:23 ` [PATCH 1/5] kernel.bbclass: blacklist 'perf-dbg' as well for the modules metapackage Otavio Salvador
2011-09-22 12:25   ` Dmitry Eremin-Solenikov
2011-09-22 12:35     ` Koen Kooi
2011-09-22 13:00       ` Dmitry Eremin-Solenikov
2011-09-22 13:17         ` Koen Kooi
2011-09-22 13:28           ` Bruce Ashfield
2011-09-22 13:56             ` Koen Kooi
2011-09-22 14:04               ` Bruce Ashfield
2011-09-28  8:47 ` Dmitry Eremin-Solenikov
2011-09-28 14:52   ` Richard Purdie
2011-09-28 14:50 ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316297897-698-3-git-send-email-dbaryshkov@gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.