All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] genericx86-common.inc: add dependency do_image_wic -> do_bootimg
@ 2016-10-10 14:43 Ed Bartosh
  2016-10-10 19:07 ` Christopher Larson
  0 siblings, 1 reply; 4+ messages in thread
From: Ed Bartosh @ 2016-10-10 14:43 UTC (permalink / raw)
  To: poky

do_image_wic depends on do_bootimg on genericx86 machines as it
copies files from hddimg/EFI/BOOT directory to boot partition.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta-yocto-bsp/conf/machine/include/genericx86-common.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-yocto-bsp/conf/machine/include/genericx86-common.inc b/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
index 7d3b93f..2e59a95 100644
--- a/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
+++ b/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
@@ -23,3 +23,4 @@ EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
 IMAGE_FSTYPES += "wic"
 WKS_FILE ?= "mkefidisk.wks"
 do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot"
+do_image_wic[recrdeptask] += "do_bootimg"
-- 
2.1.4



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

* Re: [PATCH] genericx86-common.inc: add dependency do_image_wic -> do_bootimg
  2016-10-10 14:43 [PATCH] genericx86-common.inc: add dependency do_image_wic -> do_bootimg Ed Bartosh
@ 2016-10-10 19:07 ` Christopher Larson
  2016-10-12 10:10   ` Ed Bartosh
  2016-10-12 11:47   ` [PATCH] image_types.bbclass: " Ed Bartosh
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Larson @ 2016-10-10 19:07 UTC (permalink / raw)
  To: Ed Bartosh; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

On Mon, Oct 10, 2016 at 7:43 AM, Ed Bartosh <ed.bartosh@linux.intel.com>
wrote:

> do_image_wic depends on do_bootimg on genericx86 machines as it
> copies files from hddimg/EFI/BOOT directory to boot partition.
>
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
>

Thoughts on adding
https://github.com/MentorEmbedded/meta-mentor/blob/master/meta-mentor-staging/classes/bootimg-wic.bbclass
to
image.bbclass? I think we can assume the existence of do_bootimg means we
should depend on it, as the class was inherited.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1359 bytes --]

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

* Re: [PATCH] genericx86-common.inc: add dependency do_image_wic -> do_bootimg
  2016-10-10 19:07 ` Christopher Larson
@ 2016-10-12 10:10   ` Ed Bartosh
  2016-10-12 11:47   ` [PATCH] image_types.bbclass: " Ed Bartosh
  1 sibling, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2016-10-12 10:10 UTC (permalink / raw)
  To: Christopher Larson; +Cc: poky

On Mon, Oct 10, 2016 at 12:07:10PM -0700, Christopher Larson wrote:
> On Mon, Oct 10, 2016 at 7:43 AM, Ed Bartosh <ed.bartosh@linux.intel.com>
> wrote:
> 
> > do_image_wic depends on do_bootimg on genericx86 machines as it
> > copies files from hddimg/EFI/BOOT directory to boot partition.
> >
> > Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> >
> 
> Thoughts on adding
> https://github.com/MentorEmbedded/meta-mentor/blob/master/meta-mentor-staging/classes/bootimg-wic.bbclass
> to
> image.bbclass? I think we can assume the existence of do_bootimg means we
> should depend on it, as the class was inherited.

Thank you for the idea! I was looking for something like that.

BTW, even adding dependency without checking anything would work:
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
+do_image_wic[recrdeptask] += "do_bootimg"

but it's too implicit. Your suggestion is much better.

I'll send a patch soon.

--
Regards,
Ed


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

* [PATCH] image_types.bbclass: add dependency do_image_wic -> do_bootimg
  2016-10-10 19:07 ` Christopher Larson
  2016-10-12 10:10   ` Ed Bartosh
@ 2016-10-12 11:47   ` Ed Bartosh
  1 sibling, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2016-10-12 11:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

To produce certain types of images wic uses do_bootimg results
to assemble final image. For example, it copies BOOT/EFI directory
produced by do_bootimg to boot partition for every EFI image.

The tricky part of this is that do_bootimg task is not always run,
so we can't always make do_image_wic depend on do_bootimg. We only
need to do it if do_bootimg present in task graph.

Thank to Cristopher Larson for this fix.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/classes/image_types.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 5ef6f60..a7fffbc 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -219,6 +219,11 @@ USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s
 WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
 
+python () {
+    if d.getVar('USING_WIC', True) and 'do_bootimg' in d:
+        bb.build.addtask('do_image_wic', '', 'do_bootimg', d)
+}
+
 python do_write_wks_template () {
     """Write out expanded template contents to WKS_FULL_PATH."""
     import re
-- 
2.1.4



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

end of thread, other threads:[~2016-10-12 12:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10 14:43 [PATCH] genericx86-common.inc: add dependency do_image_wic -> do_bootimg Ed Bartosh
2016-10-10 19:07 ` Christopher Larson
2016-10-12 10:10   ` Ed Bartosh
2016-10-12 11:47   ` [PATCH] image_types.bbclass: " Ed Bartosh

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.