BSP 6.0.0 doesn't build

Are 6.1.0 monthly or 6.0.0 quarterly really released? Both fail to build.
Build instructions here don’t know anything about 6.x.x. Please update along with instructions on how to choose latest monthly or quaterly ones.

repo init -u https://git.toradex.com/toradex-manifest.git -b kirkstone-6.x.y -m tdxref/default.xml 
repo sync
~/oe-core/build$ MACHINE=colibri-imx7 bitbake tdx-reference-minimal-image
Loading cache: 100% |#############################################################################| Time: 0:00:00
Loaded 4526 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "colibri-imx7"
DISTRO               = "tdx-xwayland"
DISTRO_VERSION       = "6.1.0-devel-20221109162513+build.0"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta-toradex-nxp     = "HEAD:c0e40951656f06b6691448eb3b9041a5ac827d47"
meta-freescale       = "HEAD:133d626a0626c61fd66549e555b2883a5e7ca516"
meta-freescale-3rdparty = "HEAD:5977197340c7a7db17fe3e02a4e014ad997565ae"
meta-toradex-bsp-common = "HEAD:be8cf57e1bf2ccb049923a62787a6a90efd58a4c"
meta-oe              
meta-filesystems     
meta-gnome           
meta-xfce            
meta-networking      
meta-multimedia      
meta-python          = "HEAD:744a4b6eda88b9a9ca1cf0df6e18be384d9054e3"
meta-freescale-distro = "HEAD:d5bbb487b2816dfc74984a78b67f7361ce404253"
meta-toradex-demos   = "HEAD:b020ecb69f425e14ab1c2daccc074d1f89ae071e"
meta-qt5             = "HEAD:5b71df60e523423b9df6793de9387f87a149ac42"
meta-toradex-distro  = "HEAD:d80a3f9992c87f61228498286db89dd33f5be592"
meta-poky            = "HEAD:b5cf7a6501d954ac76b18d7ef91376b5a046a522"
meta                 = "HEAD:4781fee6aea9512b7cb390b76e6f9f0a86a5bd11"

Initialising tasks: 100% |########################################################################| Time: 0:00:03
Sstate summary: Wanted 1670 Local 0 Mirrors 0 Missed 1670 Current 586 (0% match, 25% complete)
NOTE: Executing Tasks
ERROR: u-boot-toradex-1_2022.07-r0 do_patch: Applying patch '0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch' on target directory '/home/edward/oe-core/build/tmp/work/colibri_imx7-tdx-linux-gnueabi/u-boot-toradex/1_2022.07-r0/git'
CmdError('quilt --quiltrc /home/edward/oe-core/build/tmp/work/colibri_imx7-tdx-linux-gnueabi/u-boot-toradex/1_2022.07-r0/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: Applying patch 0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch
patching file include/configs/colibri_imx7.h
Hunk #1 FAILED at 142.
1 out of 1 hunk FAILED -- rejects in file include/configs/colibri_imx7.h
Patch 0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch does not apply (enforce with -f)

stderr: ')
ERROR: Logfile of failure stored in: /home/edward/oe-core/build/tmp/work/colibri_imx7-tdx-linux-gnueabi/u-boot-toradex/1_2022.07-r0/temp/log.do_patch.2931777
ERROR: Task (/home/edward/oe-core/build/../layers/meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1756 tasks of which 1736 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds

Summary: 1 task failed:
  /home/edward/oe-core/build/../layers/meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb:do_patch
Summary: There was 1 ERROR message, returning a non-zero exit code.

Repo reinit to real 6.0.0 fails to bitbake as well on u-boot patching.

repo init -u https://git.toradex.com/toradex-manifest.git -b refs/tags/6.0.0 -m tdxref/default.xml
repo sync

Edward

Hi @Edward !

About the issue

The distro tdx-xwayland is meant for downstream-based images.

i.MX6 and i.MX7 based modules do not support downstream-based images on BSP 6 (but they do in BSP 5), so these modules are upstream-based only.

Therefore you will need to use the distro tdx-xwayland-upstream instead of tdx-xwayland.

Let us know if this solves the issue.

About the documentation

The documentation around BSP 6 is still a work in progress. You can expect it to display this kind of information accordingly soon :slight_smile:

Also, thanks for asking about this error. While the documentation is in progress, your topic might be very helpful to other people :slight_smile:

Best regards,

Hi @henrique.tx,

Thanks for your reply.
I don’t mind distro. If you make new monthly and quarterly demos available for Tezi install, I assume they are released. If they are released, then they should be buildable out of the box (git). In fact it isn’t. I didn’t change any build config, just specified MACHINE and expected it to build. It failed to build. I can’t believe it is normal.

Regarding only mainline-future, is there a list of kernel drivers and kernel features, which are missing in new mainline kernel compared to downstream kernel. And I fear there are features, which are showstopper for 6.x.x, as well for normal support including critical patches and things like that. I expect you will provide downstream demos as well. Won’t you? What’s weird with my build that failed is older than expected 5.4.129 kernel, which Yocto tried to fetch and build. Latest BSP 5.7 uses 5.4.193.

Edward

Hi @Edward !

I understand your expectation. I will check internally about that.

Could you please specify which kernel drivers/kernel features/features/critical patches are you worried about? Having a specific list makes it easier to bring up your concerns internally :slight_smile:

Indeed it is weird.
I tried to find out what is happening and here is what I found.

By using MACHINE=colibri-imx7 (the raw nand one), the meta-toradex-nxp/conf/machine/include/colibri-imx7.inc is included by build/conf/local.conf. This colibri-imx7.inc sets the PREFERRED_PROVIDER_virtual/kernel in “layers”:

PREFERRED_PROVIDER_virtual/kernel = "linux-toradex"
PREFERRED_PROVIDER_virtual/kernel:preempt-rt = "linux-toradex"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp = "linux-toradex-mainline"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp:preempt-rt = "linux-toradex-mainline"

As tdx-xwayland (layers/meta-toradex-distro/conf/distro/tdx-xwayland.conf) was used instead of tdx-xwayland-upstream (layers/meta-toradex-distro/conf/distro/tdx-xwayland-upstream.conf) we get:

IMX_DEFAULT_BSP = "nxp"

This IMX_DEFAULT_BSP is used in layers/meta-freescale/conf/machine/include/imx-base.inc to create a new MACHINEOVERRIDES:

MACHINEOVERRIDES =. "use-${IMX_DEFAULT_BSP}-bsp:"

So, we have now the use-nxp-bsp override. Therefore the PREFERRED_PROVIDER_virtual/kernel = "linux-toradex" from colibri-imx7.inc will be used and the Linux kernel recipe will be the meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb.

Using bitbake-layers is an easy way of checking it:

oe-workdir $ . export
...
oe-workdir/build $ bitbake-layers show-recipes | grep -C1 linux-toradex
...
linux-toradex:
  meta-freescale-3rdparty 5.4.129+gitAUTOINC+828ec42a6a+gitAUTOINC+828ec42a6a
  meta-toradex-nxp     5.15-2.0.x (skipped: incompatible with machine colibri-imx7 (not in COMPATIBLE_MACHINE))
  meta-freescale-3rdparty 4.4 (skipped: incompatible with machine colibri-imx7 (not in COMPATIBLE_MACHINE))
linux-toradex-mainline:
  meta-toradex-bsp-common git (skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-toradex, not linux-toradex-mainline)
...

I will also check internally about it, but most probably, as modules based on i.MX6 and i.MX7 are not meant to use downstream-based images anymore, it is possible that trying to use downstream with them will be kept as is: unsupported by Toradex.

Best regards,

Hi

Happy smile is not appropriate here. When someone asks about BSP 2.8 here, Toradex says it is not very supported. So what to do to make it supported? Upgrade. Appearance of 6.x is clear sign 5.7.x is becoming 2.8-ish…
And as is common in this world, good new upgrade ALWAYS drops something, some guy, who never used it, decides is not important and should be dropped.
In 6.x kernel should be all iMX specific drivers for DMA, all iMX peripherals including remoteproc and imx_rpmsg_tty, sleep, standby, speed / clock governors, etc. At least that.
If you silently abandon support for downstream kernel, then I expect a list of what I loose switching to mainline kernel. I guess that list will be impressive.

It bitbakes with DISTRO=tdx-xwayland-upstream. If tdx-xwayland is not supported, then please at least make upstream default.

Edward

Hi @Edward!

I would like to clarify some points.

Saying that BSP 2.8 is not very supported is not the whole story. BSP 2.8 was an LTS release (which started in 2018) that has its support time frame and now it is EOL. This means that new releases are not expected here. Bugs found in 2.8 will not be fixed by Toradex at this point. Any question related to 2.8 will be of course recommended using newer (if not the newest) releases.

BSP is currently in maintenance mode, at least until 2023 (it can be extended, just like 2.8 was), which means that no new feature will be added in new releases. Please refer to Embedded Linux Support Strategy | Toradex Developer Center article to read more about LTS releases.

BSP 6 had its first major release now, but still, has limited scope in terms of Toradex hardware supported. As already stated, all i.MX6 and i.MX7 based modules are only upstream, but from our tests, most of the features are working very well. As this is the first BSP 6 version, you can expect more features to be available until BSP 6 enters maintenance mode. We really appreciate your comments and we are analyzing internally how we can improve/solve the issues faced.

We will bring this internally to the discussion. I just don’t know if this will be solved with documentation or with actual change on the BSP, as some i.MX8 modules aren’t still fully supported on mainline.

If you face other missing features or even bad experiences, don’t hesitate to contact us and share your issues and concerns. :slight_smile:

Best regards,

Hi @henrique.tx,

Thanks for comments.

I don’t mind old BSPs being EOLed.

Newer kernel releases address tons of issues and bugs, though these are not included in your list of fixes. It’s OK. But like with BSP2.8, same going to happen to BSP5.7 and this is why I’m trying BSP6.

No doubts here, but devil hides in details. It is like buying new phone. Either you spend hours looking for what “unimportant” and thus not mentioned in specs features they could drop, or be ready to get annoyed something obvious (to you) and cheap to implement is not included in that new model.

Edward