All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] kernel bbclass: return to original directory in do_deploy
@ 2013-03-07 22:10 Chase Maupin
  2013-03-11 19:49 ` Maupin, Chase
  0 siblings, 1 reply; 2+ messages in thread
From: Chase Maupin @ 2013-03-07 22:10 UTC (permalink / raw)
  To: openembedded-core; +Cc: Chase Maupin

All,

The below patch is just one way to fix the issue of dtb files
not being copied into the deploy directory by the linux-dtb.inc
file.  The details below show why this failed.  The reason I am
marking this as an RFC is because I'm not sure this is the *best*
way to fix the issue.  What I'm concerned about is whether others
have already adapted their do_deploy_append functions to work
around the directory location that the script is in after running
the kernel_do_deploy step.  For example in the meta-ti layer
the multi-kernel.inc file first changes directory to ${S} in
the do_deploy_append function.

It seems likely that if anyone has adapted to this then they are
probably just doing a cd into ${S} but I wanted to get feedback
on whether to fix the generic kernel_do_deploy function or just
fix the do_deploy_append function in linux-dtb.inc.

* During the base kernel_do_deploy function the directory is
  changed to DEPLOYDIR in order to do some cleanup and symlinking.
  However, the directory is not changed back to the original
  starting directory ${S} at the end.  For append functions this
  means that the starting directory is not ${S} as expected but
  instead ${DEPLOYDIR}.

  For functions like the do_deploy_append in
  recipes-kernel/linux/linux-dtb.inc there is an assumption that
  you are still in the source directory and not the DEPLOYDIR.
  Without this change the .dtb files are not copied because the
  check for the existence of ${DTS_FILE} which is a relative
  path from the ${S} directory fails.  This means that the .dtb
  files are not copied into the deploy directory and subsequently
  the deploy/images directory.

  In the log.do_deploy file you will see lines like:

    Warning: arch/arm/boot/dts/xxxxx.dts is not available!

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
 meta/classes/kernel.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 0a0430e..d57d1f5 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -352,6 +352,7 @@ kernel_do_deploy() {
 	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
 
 	cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
+	cd -
 }
 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
 
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] kernel bbclass: return to original directory in do_deploy
  2013-03-07 22:10 [RFC] kernel bbclass: return to original directory in do_deploy Chase Maupin
@ 2013-03-11 19:49 ` Maupin, Chase
  0 siblings, 0 replies; 2+ messages in thread
From: Maupin, Chase @ 2013-03-11 19:49 UTC (permalink / raw)
  To: Maupin, Chase, openembedded-core

> -----Original Message-----
> From: Maupin, Chase
> Sent: Thursday, March 07, 2013 4:11 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Maupin, Chase
> Subject: [RFC] kernel bbclass: return to original directory in
> do_deploy

Just a quick ping on this.  Is anyone else seeing this issue?

> 
> All,
> 
> The below patch is just one way to fix the issue of dtb files
> not being copied into the deploy directory by the linux-dtb.inc
> file.  The details below show why this failed.  The reason I am
> marking this as an RFC is because I'm not sure this is the *best*
> way to fix the issue.  What I'm concerned about is whether others
> have already adapted their do_deploy_append functions to work
> around the directory location that the script is in after running
> the kernel_do_deploy step.  For example in the meta-ti layer
> the multi-kernel.inc file first changes directory to ${S} in
> the do_deploy_append function.
> 
> It seems likely that if anyone has adapted to this then they are
> probably just doing a cd into ${S} but I wanted to get feedback
> on whether to fix the generic kernel_do_deploy function or just
> fix the do_deploy_append function in linux-dtb.inc.
> 
> * During the base kernel_do_deploy function the directory is
>   changed to DEPLOYDIR in order to do some cleanup and
> symlinking.
>   However, the directory is not changed back to the original
>   starting directory ${S} at the end.  For append functions this
>   means that the starting directory is not ${S} as expected but
>   instead ${DEPLOYDIR}.
> 
>   For functions like the do_deploy_append in
>   recipes-kernel/linux/linux-dtb.inc there is an assumption that
>   you are still in the source directory and not the DEPLOYDIR.
>   Without this change the .dtb files are not copied because the
>   check for the existence of ${DTS_FILE} which is a relative
>   path from the ${S} directory fails.  This means that the .dtb
>   files are not copied into the deploy directory and subsequently
>   the deploy/images directory.
> 
>   In the log.do_deploy file you will see lines like:
> 
>     Warning: arch/arm/boot/dts/xxxxx.dts is not available!
> 
> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> ---
>  meta/classes/kernel.bbclass |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass
> b/meta/classes/kernel.bbclass
> index 0a0430e..d57d1f5 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -352,6 +352,7 @@ kernel_do_deploy() {
>  	ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
> 
>  	cp ${COREBASE}/meta/files/deploydir_readme.txt
> ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
> +	cd -
>  }
>  do_deploy[dirs] = "${DEPLOYDIR} ${B}"
> 
> --
> 1.7.0.4




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-11 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-07 22:10 [RFC] kernel bbclass: return to original directory in do_deploy Chase Maupin
2013-03-11 19:49 ` Maupin, Chase

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.