From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Mike Crowe <mac@mcrowe.com>
Cc: Openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency and bundling
Date: Wed, 20 Nov 2013 17:14:27 +0000 [thread overview]
Message-ID: <1384967667.16887.76.camel@ted> (raw)
In-Reply-To: <20131120170428.GA28867@mcrowe.com>
On Wed, 2013-11-20 at 17:04 +0000, Mike Crowe wrote:
> This patch defeats using the sstate-cache. The kernel is resurrected from
> the sstate cache but ends up being built again since do_bundle_initramfs
> depends on do_compile. (Note that Richard Purdie's bitbake fix in
> http://git.openembedded.org/bitbake/commit/?h=master-next&id=f21910157d873c030b149c4cdc5b57c5062ab5a6
> is required for it to even work that well.)
>
> When testing I also found that do_bundle_initramfs could race against
> do_install so I think that do_bundle_initramfs needs to be run after
> do_install.
>
> Here's my RFC patch to ensure that the sstate cache continues to be used
> effectively. The plan is to run do_bundle_initramfs before do_deploy and
> then move the code to update the deploy directory to do_deploy but make it
> write to ${DEPLOYDIR} rather then ${DEPLOY_DIR_IMAGE}.
>
> In my limited testing this seems to make the sstate cache work effectively
> when INITRAMFS_IMAGE_BUNDLE="1" but I think it needs someone who actually
> uses this feature to test the patch and point out what I've got wrong
> before it can be merged.
This looks like the right thing to be doing, tasks should not be poking
into DEPLOY_DIR_IMAGE themselves as that bypasses sstate.
We need to kill the do_bundle_initramfs[nostamp] = "1" too.
Cheers,
Richard
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 6959aa1..0ba0044 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -134,16 +134,6 @@ do_bundle_initramfs () {
> echo "There is kernel image bundled with initramfs: ${B}/${KERNEL_OUTPUT}.initramfs"
> install -m 0644 ${B}/${KERNEL_OUTPUT}.initramfs ${D}/boot/${KERNEL_IMAGETYPE}-initramfs-${MACHINE}.bin
> echo "${B}/${KERNEL_OUTPUT}.initramfs"
> - cd ${B}
> - # Update deploy directory
> - if [ -e "${KERNEL_OUTPUT}.initramfs" ]; then
> - echo "Copying deploy kernel-initramfs image and setting up links..."
> - initramfs_base_name=${INITRAMFS_BASE_NAME}
> - initramfs_symlink_name=${KERNEL_IMAGETYPE}-initramfs-${MACHINE}
> - install -m 0644 ${KERNEL_OUTPUT}.initramfs ${DEPLOY_DIR_IMAGE}/${initramfs_base_name}.bin
> - cd ${DEPLOY_DIR_IMAGE}
> - ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
> - fi
> fi
> }
> do_bundle_initramfs[nostamp] = "1"
> @@ -152,7 +142,7 @@ python do_devshell_prepend () {
> os.environ["LDFLAGS"] = ''
> }
>
> -addtask bundle_initramfs after do_compile before do_build
> +addtask bundle_initramfs after do_install before do_deploy
>
> kernel_do_compile() {
> unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
> @@ -479,6 +469,17 @@ kernel_do_deploy() {
> ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGETYPE}
>
> cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
> +
> + cd ${B}
> + # Update deploy directory
> + if [ -e "${KERNEL_OUTPUT}.initramfs" ]; then
> + echo "Copying deploy kernel-initramfs image and setting up links..."
> + initramfs_base_name=${INITRAMFS_BASE_NAME}
> + initramfs_symlink_name=${KERNEL_IMAGETYPE}-initramfs-${MACHINE}
> + install -m 0644 ${KERNEL_OUTPUT}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
> + cd ${DEPLOYDIR}
> + ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
> + fi
> }
> do_deploy[dirs] = "${DEPLOYDIR} ${B}"
> do_deploy[prefuncs] += "package_get_auto_pr"
>
>
> Mike.
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
prev parent reply other threads:[~2013-11-20 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 19:11 [PATCH] kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency and bundling Jason Wessel
2013-08-20 13:51 ` Bruce Ashfield
2013-08-20 15:03 ` Andrea Adami
2013-08-20 16:28 ` Bruce Ashfield
2013-08-20 16:41 ` Andrea Adami
2013-08-20 19:31 ` Bruce Ashfield
2013-11-20 17:04 ` Mike Crowe
2013-11-20 17:14 ` Richard Purdie [this message]
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=1384967667.16887.76.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=Openembedded-core@lists.openembedded.org \
--cc=mac@mcrowe.com \
/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.