Skip to contentSkip to conversation

image_types_wic: set consistent staging dirs

PATCH In review [email protected] 2 participants 5 messages Oct 12, 2018 – Oct 15, 2018

lore
Share & tools
lore
#0 lore raw

cover image_types_wic: set consistent staging dirs

From: Kai Kang <[email protected]>

The following changes since commit 793a82c2da639088884c93595e6a3f28e5e3d747:

oeqa/manual/oe-core: Drop image build during taskexp test (2018-10-11 23:06:35 +0100)

are available in the Git repository at:

git://git.pokylinux.org/poky-contrib kangkai/wic
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/wic

Kai Kang (1):
image_types_wic: set consistent staging dirs

 meta/classes/image_types_wic.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/1 image_types_wic: set consistent staging dirs

From: Kai Kang <[email protected]>

When build wic image with multilib enabled by following config:

MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

IMAGE_FSTYPES = "wic"

it fails to build lib32 image such as lib32-core-image-minimal:

| DEBUG: Executing shell function do_image_wic
| INFO: Creating image(s)...
|
| ERROR: Couldn't find correct bootimg_dir, exiting

Dependency syslinux is not expand to lib32-syslinux when multilib is enabled. It is populated to ${WORKDIR}/recipe-sysroot, but script wic searches syslinux in ${WORKDIR}/lib32-recipe-sysroot and causes error.

Set consistent staging dirs for wic to fix the issue.

---
 meta/classes/image_types_wic.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/image_types_wic.bbclass +5 -0
index 5b40a9e919..402920805d 100644
@@ -54,6 +54,11 @@ WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS
 
 DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else '' }"
 
+# Dependency syslinux is not expanded when multilib is enabled, consistent staging dirs are needed
+RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_HOST = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_TARGET = "${WORKDIR}/recipe-sysroot"
+
 python do_write_wks_template () {
     """Write out expanded template contents to WKS_FULL_PATH."""
     import re
Signature · 1 line
2.18.0
#2 lore raw
Quoted 43 lines · On Fri, 2018-10-12 at 16:57 +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

When build wic image with multilib enabled by following config:

MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

IMAGE_FSTYPES = "wic"

it fails to build lib32 image such as lib32-core-image-minimal:

Quoted 4 lines

DEBUG: Executing shell function do_image_wic
INFO: Creating image(s)...

ERROR: Couldn't find correct bootimg_dir, exiting

Dependency syslinux is not expand to lib32-syslinux when multilib is enabled. It is populated to ${WORKDIR}/recipe-sysroot, but script wic searches syslinux in ${WORKDIR}/lib32-recipe-sysroot and causes error.

Set consistent staging dirs for wic to fix the issue.

---
 meta/classes/image_types_wic.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/image_types_wic.bbclass +0 -0
index 5b40a9e919..402920805d 100644
@@ -54,6 +54,11 @@ WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT}

${WKS_FILE_DEPENDS_BOOTLOADERS

DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else
'' }"

+# Dependency syslinux is not expanded when multilib is enabled, consistent staging dirs are needed

meta/classes/image_types_wic.bbclass WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS · line 61

Quoted 4 lines
meta/classes/image_types_wic.bbclass +4 -0
+RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_HOST = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_TARGET = "${WORKDIR}/recipe-sysroot"
+

Doesn't that change this for *all* image types? Not sure that is a good idea...

Cheers,

Richard

author
#3 lore raw
Quoted 41 lines · Richard Purdie
Quoted 40 lines · On Fri, 2018-10-12 at 16:57 +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

When build wic image with multilib enabled by following config:

MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

IMAGE_FSTYPES = "wic"

it fails to build lib32 image such as lib32-core-image-minimal:

Quoted 4 lines

DEBUG: Executing shell function do_image_wic
INFO: Creating image(s)...

ERROR: Couldn't find correct bootimg_dir, exiting

Dependency syslinux is not expand to lib32-syslinux when multilib is enabled. It is populated to ${WORKDIR}/recipe-sysroot, but script wic searches syslinux in ${WORKDIR}/lib32-recipe-sysroot and causes error.

Set consistent staging dirs for wic to fix the issue.

---
  meta/classes/image_types_wic.bbclass | 5 +++++
  1 file changed, 5 insertions(+)
meta/classes/image_types_wic.bbclass +0 -0
index 5b40a9e919..402920805d 100644
@@ -54,6 +54,11 @@ WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT}

${WKS_FILE_DEPENDS_BOOTLOADERS

DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else
'' }"

Quoted 8 lines

meta/classes/image_types_wic.bbclass WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS · line 61

Quoted 6 lines

+# Dependency syslinux is not expanded when multilib is enabled, consistent staging dirs are needed

meta/classes/image_types_wic.bbclass +4 -0
+RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_HOST = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_TARGET = "${WORKDIR}/recipe-sysroot"
+

Doesn't that change this for *all* image types? Not sure that is a good idea...

OK. I'll build and test all image types.

--Kai

Quoted 7 lines

Cheers,

Richard

Signature · 2 lines
Regards,
Neil | Kai Kang
#4 lore raw
Quoted 58 lines · Kang Kai
Quoted 46 lines · Richard Purdie
Quoted 45 lines · On Fri, 2018-10-12 at 16:57 +0800, [email protected] wrote:

From: Kai Kang <[email protected]>

When build wic image with multilib enabled by following config:

MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

IMAGE_FSTYPES = "wic"

it fails to build lib32 image such as lib32-core-image-minimal:

Quoted 4 lines

DEBUG: Executing shell function do_image_wic
INFO: Creating image(s)...

ERROR: Couldn't find correct bootimg_dir, exiting

Dependency syslinux is not expand to lib32-syslinux when multilib is
enabled. It is populated to ${WORKDIR}/recipe-sysroot, but script wic
searches syslinux in ${WORKDIR}/lib32-recipe-sysroot and causes error.

Set consistent staging dirs for wic to fix the issue.

---
  meta/classes/image_types_wic.bbclass | 5 +++++
  1 file changed, 5 insertions(+)
meta/classes/image_types_wic.bbclass +0 -0
index 5b40a9e919..402920805d 100644
@@ -54,6 +54,11 @@ WKS_FILE_DEPENDS ??=
 "${WKS_FILE_DEPENDS_DEFAULT}

${WKS_FILE_DEPENDS_BOOTLOADERS

DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC')
else
'' }"

Quoted 10 lines

meta/classes/image_types_wic.bbclass WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS · line 61

Quoted 6 lines

+# Dependency syslinux is not expanded when multilib is enabled, consistent staging dirs are needed

meta/classes/image_types_wic.bbclass +4 -0
+RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_HOST = "${WORKDIR}/recipe-sysroot"
+STAGING_DIR_TARGET = "${WORKDIR}/recipe-sysroot"
+

Doesn't that change this for *all* image types? Not sure that is a good
idea...

Quoted 1 line

OK. I'll build and test all image types.

That isn't my point, the autobuilder could test that.

I don't like changes which are so wide reaching where we can't easily evaluate the impact or potential problems in other code.

I think we need to look for a better way to fix this.

Cheers,

Richard