@srini_shanmugam I thought I'd chime in and test your long-term memory. Do you remember how you end up managing DISTRO-level changes on your platform?
I have been trying to "remove bs" from `fsl-imx-xwayland` on an imx8mp on a Variscite SoM, which as you may recall is the only DISTRO that NXP and its downstream hardware vendors support. A few months ago, I gave up on creating my own custom distro after hitting so many errors like the one you reported here, and getting no support because I wasn't using `fsl-imx-xwayland` verbatim.
In the meantime, I've been stripping `DISTRO_FEATURES` (and `MACHINE_FEATURES`) via my site.conf, which reduces image size, but only partially removes the "features". For example, an image created by removing `wifi` from *_FEATURES still has packages like `wpa_supplicant` and still runs the start/stop jobs trying to being up a non-existent `wlan0` interface at boot. The BSP/SDK layers provided by NXP and Variscite don't fully support this. I suspect that since they only test their DISTRO (with its full set of features), this sort of customization, which is a Yocto Project standard, broke a long time ago, if it ever worked. I suppose the moral of that story is that these BSPs are not Yocto Project certified.
Accepting this and moving on.. this whole time I have been using a custom image recipe, based on `core-image` and adding to IMAGE_FEATURES, IMAGE_INSTALL, and CORE_IMAGE_EXTRA_INSTALL as desired:
inherit core-image features_check image-buildinfo
REQUIRED_DISTRO_FEATURES += " alsa nfs systemd usbgadget usbhost virtualization zeroconf"
IMAGE_FEATURES:append = " \
hwcodecs \
debug-tweaks \
nfs-client \
empty-root-password \
serial-autologin-root \
tools-debug \
tools-testapps \
"
CORE_IMAGE_EXTRA_INSTALL:append = " \
packagegroup-core-full-cmdline \
packagegroup-imx-tools-audio \
packagegroup-fsl-tools-testapps \
packagegroup-fsl-tools-benchmark \
packagegroup-variscite-imx-docker \
packagegroup-variscite-devel \
systemd-analyze \
"
IMAGE_INSTALL:append = " packagegroup-tr-base"
..where packagegroup-tr-base is defined as:
inherit packagegroup
PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGES = "packagegroup-tr-base"
RDEPENDS:packagegroup-tr-base = "\
vim-tiny \
tmux \
docker-moby \
python3-docker-compose \
alsa-utils \
curl \
dosfstools \
fio \
i2c-tools \
imx-kobs \
libjack \
jack-server \
os-release \
lsb-release \
ldd \
memtester \
mtd-utils \
mtd-utils-ubifs \
openssh \
"
RRECOMMENDS:packagegroup-tr-base = ""
..and I have moved all my site.conf changes to *_FEATURES to my custom distro metadata in my custom layer, described below. near the definition of *_FEATURES variables, you can see comments that indicate which permutations built successfully, and which encountered an error. Most of these errors I've encountered appear to be caused by the above lack of support for changing *_FEATURES.
Unless anyone here has better suggestions or information, next steps for me are to start hacking at these errors one by one, patching the assumptions made in the offending metadata layer(s) about these variables (they are not constants!)
==> ../sources/meta-my-custom-layer/conf/distro/my-custom-distro-fsl-imx.conf <==
require conf/distro/fsl-imx-xwayland.conf
DISTRO = "my-custom-distro-fsl-imx"
MACHINE_FEATURES:remove = "touchscreen screen bluetooth wifi nxpiw612-sdio"
# SUCCESS ==> MACHINE_FEATURES:remove = "touchscreen screen bluetooth wifi nxpiw612-sdio"
DISTRO_FEATURES:remove = "bluetooth wifi 3g nfc "
# SUCCESS ==> DISTRO_FEATURES:remove = "bluetooth"
# SUCCESS ==> DISTRO_FEATURES:remove = "bluetooth wifi 3g nfc "
# --------------------------------------------------------------------------------------
# FAILED ==> DISTRO_FEATURES:remove = " x11 opengl vulkan wayland"
# FAILED ==> DISTRO_FEATURES:remove = "bluetooth wifi 3g nfc opengl vulkan wayland"
# FAILED ==> DISTRO_FEATURES:remove = "bluetooth wifi 3g nfc opengl"
# FAILED ==> DISTRO_FEATURES:remove = "bluetooth wifi 3g nfc x11 "
# FAILED ==> DISTRO_FEATURES:remove = "bluetooth wifi 3g nfc x11 opengl vulkan wayland"