Bug 14372 - /boot folder redundancy due to bootimg-partition.py wic plugin
Summary: /boot folder redundancy due to bootimg-partition.py wic plugin
Status: ACCEPTED
Alias: None
Product: General Runtime
Classification: Runtime
Component: General Runtime (show other bugs)
Version: 3.1.10
Hardware: All Multiple
: Medium enhancement
Target Milestone: 6.99
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-05-02 08:25 UTC by Maxim De Clercq
Modified: 2026-02-26 16:12 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim De Clercq 2021-05-02 08:25:05 UTC
The kernel.bbclass copies most files to the `/boot` folder in the rootfs.
The bootimg-partition.py wic plugin copies the files in `IMAGE_BOOT_FILES` to a separate boot partition that is mounted at `/boot`.

I do not want all those output files in the `/boot` folder (only `IMAGE_BOOT_FILES`), however I do want the vmlinux image somewhere in `/lib/modules/5.4.114+g2c1692173/vmlinux` or `/usr/lib/debug/vmlinux` for debugging.

My boot partition is in general not large enough for the vmlinux image for the crash utility.

This seems like an architectural issue.
Any idea how to fix this?
Thanks in advance.
Comment 1 Maxim De Clercq 2021-05-02 08:45:37 UTC
At the moment I have replaced the last lines of `kernel_do_install` with the following.

```
for d in ${D}/${KERNEL_IMAGEDEST} ${D}${sysconfdir}/modules-load.d ${D}${sysconfdir}/modprobe.d; do
    install -d $d
done
for f in ${KERNEL_IMAGETYPES}; do
    install -m 0644 ${KERNEL_OUTPUT_DIR}/$f ${D}/${KERNEL_IMAGEDEST}/$f
done
for f in .config System.map vmlinux; do
    [ -e $f ] && install -m 0644 $f ${D}/${KERNEL_IMAGEDEST}/${f/.}
done
```
Comment 2 Randy MacLeod 2021-05-06 14:41:59 UTC
Bruce is worried that this could break things for some people but he says he'll try it.
Comment 3 Maxim De Clercq 2021-06-15 14:19:54 UTC
(In reply to comment #2)
> Bruce is worried that this could break things for some people but he says
> he'll try it.

(In reply to comment #2)
> Bruce is worried that this could break things for some people but he says
> he'll try it.

Cleaning up the boot directory like this gives me a lot of deterministic errors. 
Any idea how to fix this?

```
# Do not populate the /boot directory since we have a boot partition
FILES_${KERNEL_PACKAGE_NAME}-dev = "${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
FILES_${KERNEL_PACKAGE_NAME}-vmlinux = "/usr/lib/debug/vmlinux"

do_install_append () {
    # Do not populate the /boot directory since we have a boot partition and install vmlinux in the debug directory if present
    rm -rf ${D}/boot
    [ -e ${KERNEL_OUTPUT_DIR}/vmlinux ] && \
        install -d ${D}${libdir}/debug && \
        install -m 0644 ${KERNEL_OUTPUT_DIR}/vmlinux ${D}${libdir}/debug/vmlinux
}
```

```
Sstate summary: Wanted 224 Found 211 Missed 13 Current 1565 (94% match, 99% complete)
NOTE: Executing Tasks
ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: linux-fslc-imx-5.4.119+gitAUTOINC+dc9c8a20af-r0 do_package: Taskhash mismatch 2b4f32ef768616bfe43a42369f2ee531a12c46e104b694e11e15e4c80b701115 versus d3d8bf5b5a178b157326b1c41a31d984ed7e880d993b66698da850e50aea1782 for /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package
ERROR: Taskhash mismatch 2b4f32ef768616bfe43a42369f2ee531a12c46e104b694e11e15e4c80b701115 versus d3d8bf5b5a178b157326b1c41a31d984ed7e880d993b66698da850e50aea1782 for /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package
ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

ERROR: When reparsing /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:do_package, the basehash value changed from 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The metadata is not deterministic and this needs to be fixed.
ERROR: The following commands may help:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
ERROR: Then:
ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff

NOTE: Tasks Summary: Attempted 4513 tasks of which 4344 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds

Summary: There were 67 ERROR messages shown, returning a non-zero exit code.
```
Comment 4 Maxim De Clercq 2021-06-15 14:37:01 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Bruce is worried that this could break things for some people but he says
> > he'll try it.
> 
> (In reply to comment #2)
> > Bruce is worried that this could break things for some people but he says
> > he'll try it.
> 
> Cleaning up the boot directory like this gives me a lot of deterministic
> errors. 
> Any idea how to fix this?
> 
> ```
> # Do not populate the /boot directory since we have a boot partition
> FILES_${KERNEL_PACKAGE_NAME}-dev = "${KERNEL_SRC_PATH}
> ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
> FILES_${KERNEL_PACKAGE_NAME}-vmlinux = "/usr/lib/debug/vmlinux"
> 
> do_install_append () {
>     # Do not populate the /boot directory since we have a boot partition and
> install vmlinux in the debug directory if present
>     rm -rf ${D}/boot
>     [ -e ${KERNEL_OUTPUT_DIR}/vmlinux ] && \
>         install -d ${D}${libdir}/debug && \
>         install -m 0644 ${KERNEL_OUTPUT_DIR}/vmlinux
> ${D}${libdir}/debug/vmlinux
> }
> ```
> 
> ```
> Sstate summary: Wanted 224 Found 211 Missed 13 Current 1565 (94% match, 99%
> complete)
> NOTE: Executing Tasks
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: linux-fslc-imx-5.4.119+gitAUTOINC+dc9c8a20af-r0 do_package: Taskhash
> mismatch 2b4f32ef768616bfe43a42369f2ee531a12c46e104b694e11e15e4c80b701115
> versus d3d8bf5b5a178b157326b1c41a31d984ed7e880d993b66698da850e50aea1782 for
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package
> ERROR: Taskhash mismatch
> 2b4f32ef768616bfe43a42369f2ee531a12c46e104b694e11e15e4c80b701115 versus
> d3d8bf5b5a178b157326b1c41a31d984ed7e880d993b66698da850e50aea1782 for
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> ERROR: When reparsing
> /work/sources/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb:
> do_package, the basehash value changed from
> 8e79c80e317e385ba646aa2302e53ca93b39878361728231d7704ef518565fb7 to
> 8b02d6357eaef6b9c09a405515489cf99c810c624b0fcae92ed4c0913031a273. The
> metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Snone
> ERROR: Then:
> ERROR: $ bitbake linux-fslc-imx -cdo_package -Sprintdiff
> 
> NOTE: Tasks Summary: Attempted 4513 tasks of which 4344 didn't need to be
> rerun and all succeeded.
> NOTE: Writing buildhistory
> NOTE: Writing buildhistory took: 1 seconds
> 
> Summary: There were 67 ERROR messages shown, returning a non-zero exit code.
> ```

If I build again, the errors are gone, but this is quite inconvenient.
Comment 5 Randy MacLeod 2023-04-21 18:45:45 UTC
Moved en masse from 4.2 to 4.3 by Randy.
Comment 6 Randy MacLeod 2024-10-17 19:04:15 UTC
Bulk move of medium importance bugs from 5.1 to 5.2 on behalf of Bruce.
Comment 7 Randy MacLeod 2026-02-26 16:12:14 UTC
Parking in 6.99