Mmc-utils-cos.postinst returned 1

Hi,

BB_VERSION           = "2.8.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "colibri-imx7-emmc"
DISTRO               = "tdx-xwayland-upstream"
DISTRO_VERSION       = "7.4.0-devel-20250904070710+build.0"

when trying to build tdx-reference-multimedia-image i get the followind error

WARNING: mmc-utils-cos.postinst returned 1, marking as unpacked only, configuration required on target.
ERROR: Postinstall scriptlets of ['mmc-utils-cos'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget:${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.

I have been building tdx-reference-minimal-image for some time without this error.

Anyone ideas to what causes this?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Postinstall Scriptlet Error for mmc-utils-cos

Issue Analysis

The error you’re encountering with mmc-utils-cos.postinst is a postinstall scriptlet failure during the tdx-reference-multimedia-image build (1). This is different from the minimal image because the multimedia image includes additional packages that the minimal image doesn’t have (1).

Troubleshooting Steps

1. Clean Build Cache

Start by cleaning the build cache to resolve potential corruption (2):

bitbake -c cleanall tdx-reference-multimedia-image
bitbake -c cleansstate tdx-reference-multimedia-image

2. Check Configuration Files

Verify your local.conf and bblayers.conf files for any misconfigurations (2). Since you’re building for colibri-imx7-emmc, ensure you have the correct NXP EULA acceptance (1):

ACCEPT_FSL_EULA = "1"

3. Review Build Logs

Examine the detailed logs located in build/tmp/log/cooker/$MACHINE/ for more specific error information (2). The error message mentions the failure details should be in the log file.

4. Environment Setup

Ensure your build environment is correctly set up by sourcing the environment setup script (2):

source export

Image Differences

The key difference is that tdx-reference-multimedia-image includes additional packages compared to tdx-reference-minimal-image (1):

  • Reference Minimal Image: Basic console-only image with minimal packages (1)
  • Reference Multimedia Image: Includes Qt, multimedia features, graphics stack (Weston/Wayland + XWayland), and additional graphical packages (1)

The mmc-utils-cos package is likely included in the multimedia image’s additional package set, which is why you don’t see this error with the minimal image.

Additional Considerations

If the issue persists after trying the above steps, you may need to investigate the specific postinstall script for mmc-utils-cos or consider if there are any recent changes to your build environment that might have introduced this problem (2).

Best regards, Toradex AI Assistant.

@ToradexAI
i have added the mmc-utils in local.conf so it is in both builds

Thanks for your response.

Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.

Did you like my answer? :+1: :-1:


mmc-utils Package Issue Analysis

Since you’ve added mmc-utils to both builds via local.conf, the issue appears to be specifically with the mmc-utils-cos variant that’s included in the multimedia image.

Understanding the mmc-utils Context

The mmc-utils package is used for eMMC management and diagnostics (1). Based on the documentation, mmc-utils is compiled and used for various eMMC operations (1):

$ bitbake mmc-utils

(1)

The package is used for operations like checking eMMC write protection status (1):

# mmc writeprotect user get /dev/emmc

(1)

Troubleshooting the Postinstall Script Error

Since the error specifically mentions mmc-utils-cos.postinst, this suggests there’s a custom or modified version of mmc-utils in your multimedia image build that has a failing postinstall script.

Recommended Solutions:

  1. Check Package Variants: The multimedia image may be pulling in a different variant of mmc-utils (mmc-utils-cos) compared to what you explicitly added to local.conf.

  2. Clean Specific Package: Try cleaning just the problematic package:

bitbake -c cleansstate mmc-utils-cos
bitbake -c cleanall mmc-utils-cos
  1. Review Package Dependencies: Check what’s pulling in mmc-utils-cos specifically in the multimedia image:
bitbake -g tdx-reference-multimedia-image
  1. Defer Postinstall Script: As the error message suggests, you can modify the recipe to defer the postinstall script to first boot by using pkg_postinst_ontarget instead of pkg_postinst.

The key difference is that your minimal image uses the standard mmc-utils package you added, while the multimedia image appears to include a variant (mmc-utils-cos) with a problematic postinstall script.

Best regards, Toradex AI Assistant.

I removed the mmc-utils that i had added myself, and now it builds.
So there was a conflict between the mmc-utils and mms-utils-cos package.

Hello @BDSKPEF,

Thanks for sending the solution.

Best Regards,
Bruno