Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Koen Kooi <public-koen-QLwJDigV5abLmq1fohREcCpxlwaOVQ5f@lo.gmane.org>
Subject: Re: [PATCH 2/9] kernel.bbclass: move uImage handling to separate task
Date: Thu, 15 Dec 2011 10:23:14 +0400	[thread overview]
Message-ID: <4EE99252.9060308@gmail.com> (raw)
In-Reply-To: <CD461DDE-5A9A-4194-9043-A692EB22A9E8@dominion.thruhere.net>

On 12/15/2011 01:20 AM, Koen Kooi wrote:
>
> Op 13 dec. 2011, om 16:19 heeft Dmitry Eremin-Solenikov het volgende geschreven:
>
>> As per org.oe.dev and meta-oe's kernel.bbclass move uImage creation to
>> separate task from do_deploy. This way the do_install task can also
>> benefit from generated uImage.
>>
>> The only major feature of oe-core's version (not to recreate uImage
>> if it exists) is retained in this patch
>
> The whole point of the OE uImage handling is that in general we know better than the kernel and can apply fixups if needed (turning on/off compression, etc)

Please check the history of OE-core uImage handling. Initially uImage 
was always recreated (as it's currently done in meta-oe). Then 
(422a017e6 on Oct 29, 2010) OE-core kernel.bbclass was changed to 
default to not to recreate uImage if it was created by kbuild (IIRC it 
was done so, because recreated uImages weren't always booting as they 
required more setup). I don't know which way is correct. Maybe we should 
add a hook that will tell if kernel.bbclass should prefer to recreate 
uImage or to use kernel one. Would you like such variable?

Another point (that I probably failed to emphasize): currently 
do_install and do_deploy will use different uImages. The image in /boot 
on rootfs might be different from uImage really in deploy dir. I would 
assume that this is not the expected way to do things.

>
>> . On the contra, as this version
>> was merged from meta-oe/org.oe.dev, new function has another feature:
>> it permits overriding the u-boot entrypoint via u-boot symbol.
>
> Not if uimage exists, see above

Of course.

>
>>
>> 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 a75c199..db00d2d 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -485,6 +485,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"
>> @@ -496,22 +520,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.7.3
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


-- 
With best wishes
Dmitry




  reply	other threads:[~2011-12-15  6:31 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 16:19 [PATCH 1/9] kernel.bbclass: compile kernel and modules in a single task Dmitry Eremin-Solenikov
2011-12-13 16:19 ` [PATCH 2/9] kernel.bbclass: move uImage handling to separate task Dmitry Eremin-Solenikov
2011-12-14 21:20   ` Koen Kooi
2011-12-15  6:23     ` Dmitry Eremin-Solenikov [this message]
2011-12-15 13:55       ` Bruce Ashfield
2011-12-15 19:09         ` Tom Rini
2011-12-15 19:20           ` Bruce Ashfield
2011-12-13 16:19 ` [PATCH 3/9] bitbake.conf, core-image-minimal-initramfs: add INITRAMFS_FSTYPES Dmitry Eremin-Solenikov
2011-12-16 16:16   ` Richard Purdie
2011-12-13 16:19 ` [PATCH 4/9] consolekit: fix sdk generation issues Dmitry Eremin-Solenikov
2011-12-15 14:58   ` Richard Purdie
2011-12-15 15:06     ` Koen Kooi
2011-12-16  1:56       ` Cui, Dexuan
2011-12-16 12:42       ` Dmitry Eremin-Solenikov
2011-12-15 16:20     ` Cui, Dexuan
2011-12-16 12:42       ` Dmitry Eremin-Solenikov
2011-12-16 15:25         ` Richard Purdie
2011-12-16 16:07           ` Dmitry Eremin-Solenikov
2011-12-16 16:46             ` Richard Purdie
2011-12-16 17:55               ` Dmitry Eremin-Solenikov
2011-12-13 16:19 ` [PATCH 5/9] Move check that all installed files are shipped into insane.bbclass Dmitry Eremin-Solenikov
2011-12-13 16:27   ` Phil Blundell
2011-12-13 16:52     ` Dmitry Eremin-Solenikov
2011-12-15 14:55   ` Richard Purdie
2011-12-13 16:19 ` [PATCH 6/9] libgcc: reintroduce debug package, containing symbols Dmitry Eremin-Solenikov
2011-12-16 16:17   ` Richard Purdie
2011-12-13 16:19 ` [PATCH 7/9] ncurses: drop empty dir to remove QA warning Dmitry Eremin-Solenikov
2011-12-13 19:43   ` Khem Raj
2011-12-13 16:19 ` [PATCH 8/9] readline: drop empty dir to shut up " Dmitry Eremin-Solenikov
2011-12-16 16:17   ` Richard Purdie
2011-12-13 16:19 ` [PATCH 9/9] libatomic-ops: drop directory with documentation to remove " Dmitry Eremin-Solenikov
2011-12-13 19:48   ` Richard Purdie
2011-12-13 22:07     ` Dmitry Eremin-Solenikov
2011-12-15 12:26       ` Richard Purdie
2011-12-13 16:22 ` [PATCH 1/9] kernel.bbclass: compile kernel and modules in a single task Phil Blundell
2011-12-13 16:46   ` Dmitry Eremin-Solenikov
2011-12-14  0:15 ` Darren Hart
2011-12-14  0:17   ` Dmitry Eremin-Solenikov
2011-12-14  0:19     ` Darren Hart
2011-12-15  9:27     ` Koen Kooi
2011-12-15 13:57       ` Bruce Ashfield
2011-12-15 14:56 ` 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=4EE99252.9060308@gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=public-koen-QLwJDigV5abLmq1fohREcCpxlwaOVQ5f@lo.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox