All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Leon Woestenberg <leon@sidebranch.com>
Cc: openembeded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [openembedded-core][PATCH] kernel.bbclass: do not deploy fitImage; kernel-fitimage.bbclass does that.
Date: Mon, 3 Sep 2018 09:54:28 -0700	[thread overview]
Message-ID: <CAMKF1spXp=U+k5yx-g7ip+U=rX4pV6-nCdPzM7_MGgfMOTLOgA@mail.gmail.com> (raw)
In-Reply-To: <1535934937-30606-1-git-send-email-leon@sidebranch.com>

Hi Leon

Please send these patches to openembedded-core ml
On Sun, Sep 2, 2018 at 5:36 PM Leon Woestenberg <leon@sidebranch.com> wrote:
>
> kernel-fitimage.bbclass replaces an occurance of "fitImage" in
> KERNEL_IMAGETYPE_FOR_MAKE by an image type that is buildable for the
> architecture (such as zImage). The kernel-fitimage.bbclass packs that
> image as sub-image in a flattened image tree image (fitImage) and
> deploys this fitImage along with the image tree source file (.its).
>
> kernel-fitimage.bbclass does not alter KERNEL_IMAGETYPES, which thus
> also contains "fitImage", which kernel.bbclass will also deploy
> redundantly with different naming.
>
> The result is a dual deployment with slightly different naming,
> each with a set of symlinks.
>
> The solution chosen is to have fitImage deployment be handled by
> kernel-fitimage.bbclass, and have kernel.bbclass ignore fitImage
> types during deployment.
>
> Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
> ---
>  meta/classes/kernel.bbclass | 30 ++++++++++++++++++------------
>  1 file changed, 18 insertions(+), 12 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index b341733..fd43ecd 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -675,8 +675,10 @@ kernel_do_deploy() {
>         fi
>
>         for type in ${KERNEL_IMAGETYPES} ; do
> -               base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
> -               install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} $deployDir/${base_name}.bin
> +               if [ "$type" != "fitImage" ]; then
> +                       base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
> +                       install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} $deployDir/${base_name}.bin
> +               fi
>         done
>         if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>                 mkdir -p ${D}/lib
> @@ -685,21 +687,25 @@ kernel_do_deploy() {
>         fi
>
>         for type in ${KERNEL_IMAGETYPES} ; do
> -               base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
> -               symlink_name=${type}-${KERNEL_IMAGE_SYMLINK_NAME}
> -               ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin
> -               ln -sf ${base_name}.bin $deployDir/${type}
> +               if [ "$type" != "fitImage" ]; then
> +                       base_name=${type}-${KERNEL_IMAGE_BASE_NAME}
> +                       symlink_name=${type}-${KERNEL_IMAGE_SYMLINK_NAME}
> +                       ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin
> +                       ln -sf ${base_name}.bin $deployDir/${type}
> +               fi
>         done
>
>         cd ${B}
>         # Update deploy directory
>         for type in ${KERNEL_IMAGETYPES} ; do
> -               if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then
> -                       echo "Copying deploy ${type} kernel-initramfs image and setting up links..."
> -                       initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
> -                       initramfs_symlink_name=${type}-initramfs-${MACHINE}
> -                       install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin
> -                       ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin
> +               if [ "$type" != "fitImage" ]; then
> +                       if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then
> +                               echo "Copying deploy ${type} kernel-initramfs image and setting up links..."
> +                               initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
> +                               initramfs_symlink_name=${type}-initramfs-${MACHINE}
> +                               install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs $deployDir/${initramfs_base_name}.bin
> +                               ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin
> +                       fi
>                 fi
>         done
>  }
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


  reply	other threads:[~2018-09-03 16:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03  0:35 [openembedded-core][PATCH] kernel.bbclass: do not deploy fitImage; kernel-fitimage.bbclass does that Leon Woestenberg
2018-09-03 16:54 ` Khem Raj [this message]
2018-09-03  0:38 Leon Woestenberg
2018-09-06 21:06 Leon Woestenberg
2018-09-07 22:10 ` Andre McCurdy
2018-09-08 13:38   ` Leon Woestenberg

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='CAMKF1spXp=U+k5yx-g7ip+U=rX4pV6-nCdPzM7_MGgfMOTLOgA@mail.gmail.com' \
    --to=raj.khem@gmail.com \
    --cc=leon@sidebranch.com \
    --cc=openembedded-devel@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.