From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Cc: Martin Jansa <martin.jansa@gmail.com>
Subject: Re: [PATCH 1/2] kernel.bbclass: merge uboot_mkimage improvements from meta-oe
Date: Thu, 29 Mar 2012 09:11:04 -0400 [thread overview]
Message-ID: <4F745F68.1090306@windriver.com> (raw)
In-Reply-To: <4b37a73d52ca39e73b4d8230269af5d9e2d88c52.1333001415.git.Martin.Jansa@gmail.com>
On 12-03-29 02:24 AM, Martin Jansa wrote:
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
A commit log here would have been nice. Since it isn't apparently
clear what the improvements are to myself or others.
I especially don't understand these cases where people start manually
running mkimage vs. taking the uImage from the kernel build. If there
is magic address foo needed to make a useful uImage for the platform,
then why isn't this data in the kernel Makefiles, vs. being squirrelled
off in some recipe? At a minimum, some comments in the recipe indicating
what the need for the custom mkimage call was about, and why it differed
from the default kernel uImage would be good.
Thanks,
Paul.
> ---
> meta/classes/kernel.bbclass | 39 +++++++++++++++++++++++----------------
> 1 files changed, 23 insertions(+), 16 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 3519e7c..8cd5fc7 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -502,32 +502,39 @@ do_sizecheck() {
>
> addtask sizecheck 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"
> -KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
> -
> -kernel_do_deploy() {
> - install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> - if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> - tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
> - fi
> -
> +do_uboot_mkimage() {
> 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
> + 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 ${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
> + 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 ${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
> + 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"
> +KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
> +
> +kernel_do_deploy() {
> + install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> + tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
> + fi
>
> cd ${DEPLOYDIR}
> rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
next prev parent reply other threads:[~2012-03-29 15:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 6:22 [PATCH 0/2] more kernel.bbclass updates Martin Jansa
2012-03-29 6:24 ` [PATCH 1/2] kernel.bbclass: merge uboot_mkimage improvements from meta-oe Martin Jansa
2012-03-29 12:54 ` Bruce Ashfield
2012-03-29 13:11 ` Paul Gortmaker [this message]
2012-03-29 6:24 ` [PATCH 2/2] kernel.bbclass: unify white spaces Martin Jansa
2012-03-29 10:05 ` Richard Purdie
2012-03-29 12:16 ` Martin Jansa
2012-03-29 13:02 ` Richard Purdie
2012-03-29 14:08 ` [PATCHv2 0/2] more kernel.bbclass updates Martin Jansa
2012-03-29 14:08 ` [PATCHv2 1/2] kernel.bbclass: merge uboot_mkimage improvements from meta-oe Martin Jansa
2012-03-29 14:15 ` Bruce Ashfield
2012-03-29 14:08 ` [PATCHv2 2/2] kernel.bbclass: unify white spaces Martin Jansa
2012-04-24 15:03 ` [PATCHv2 0/2] more kernel.bbclass updates Martin Jansa
2012-04-27 21:07 ` Saul Wold
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=4F745F68.1090306@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=martin.jansa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox