diff options
| -rw-r--r-- | recipes-containers/vcontainer/vcontainer-initramfs-create.inc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/recipes-containers/vcontainer/vcontainer-initramfs-create.inc b/recipes-containers/vcontainer/vcontainer-initramfs-create.inc index 1a22c3d4..68011abc 100644 --- a/recipes-containers/vcontainer/vcontainer-initramfs-create.inc +++ b/recipes-containers/vcontainer/vcontainer-initramfs-create.inc | |||
| @@ -44,12 +44,6 @@ python () { | |||
| 44 | d.setVarFlag('do_compile', 'nostamp', '1') | 44 | d.setVarFlag('do_compile', 'nostamp', '1') |
| 45 | d.setVarFlag('do_deploy', 'nostamp', '1') | 45 | d.setVarFlag('do_deploy', 'nostamp', '1') |
| 46 | 46 | ||
| 47 | # The kernel is built as a dependency of the rootfs image within the | ||
| 48 | # same multiconfig — no cross-multiconfig mcdepends needed. The | ||
| 49 | # previous mcdepends on mc:<mc>::virtual/kernel:do_deploy was wrong | ||
| 50 | # because it depended on the main config's kernel (which may be a | ||
| 51 | # different architecture) and deployed to DEPLOY_DIR_IMAGE (main | ||
| 52 | # config), not MC_DEPLOY (multiconfig). | ||
| 53 | } | 47 | } |
| 54 | 48 | ||
| 55 | # Only populate native sysroot, skip target sysroot to avoid libgcc conflicts | 49 | # Only populate native sysroot, skip target sysroot to avoid libgcc conflicts |
| @@ -58,12 +52,17 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
| 58 | # Dependencies: | 52 | # Dependencies: |
| 59 | # 1. The tiny initramfs image (produces cpio.gz) | 53 | # 1. The tiny initramfs image (produces cpio.gz) |
| 60 | # 2. The multiconfig rootfs image (produces squashfs) | 54 | # 2. The multiconfig rootfs image (produces squashfs) |
| 61 | # 3. The kernel from main build | 55 | # 3. The kernel (deployed transitively via image.bbclass do_build) |
| 62 | # | 56 | # |
| 63 | # Both initramfs and rootfs images are in the same multiconfig | 57 | # Both image recipes inherit core-image/image.bbclass which has: |
| 64 | do_compile[depends] = "${VCONTAINER_RUNTIME}-tiny-initramfs-image:do_image_complete" | 58 | # do_build[depends] += "virtual/kernel:do_deploy" |
| 65 | do_compile[depends] += "${VCONTAINER_RUNTIME}-rootfs-image:do_image_complete" | 59 | # By depending on do_build (not do_image_complete), we ensure the |
| 66 | # mcdepends set conditionally in anonymous python below | 60 | # kernel is deployed to MC_DEPLOY before do_compile copies it. |
| 61 | # Using do_image_complete cut the chain short — it runs before | ||
| 62 | # do_build, so virtual/kernel:do_deploy was not guaranteed to have | ||
| 63 | # run, causing missing kernel on sstate-accelerated builds. | ||
| 64 | do_compile[depends] = "${VCONTAINER_RUNTIME}-tiny-initramfs-image:do_build" | ||
| 65 | do_compile[depends] += "${VCONTAINER_RUNTIME}-rootfs-image:do_build" | ||
| 67 | 66 | ||
| 68 | S = "${UNPACKDIR}" | 67 | S = "${UNPACKDIR}" |
| 69 | B = "${WORKDIR}/build" | 68 | B = "${WORKDIR}/build" |
