Backports for TK1 mainline kernel

Hi,
I want to use the backports_5.4 for the TK1 with the mainline kernel. Now i realized that the backports are removed from the image in “tdx-extra.inc”. Is there any reason for that? However, when i do include the backports into the image i am getting the error shown below. It seems that the backports require BT to be disabled, but its not included in the backports. Well, i need bluetooth either one way or the other. BT is working fine in your 5.4 branch and it works in the 4.14 mainline. How can i fix that? Or is there a easy understandable instruction how to create the backports manually? Regards

ERROR: backports-5.4-r0 do_compile: oe_runmake failed
ERROR: backports-5.4-r0 do_compile: Function failed: do_compile (log file is located at /home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/backports/5.4-r0/temp/log.do_compile.11345)
ERROR: Logfile of failure stored in: /home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/backports/5.4-r0/temp/log.do_compile.11345
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 KLIB_BUILD=/home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-build-artifacts KLIB=/home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source
| make[5]: 'conf' is up to date.
| boolean symbol BT tested for 'm'? test forced to 'n'
| #
| # configuration written to .config
| #
| Building backport-include/backport/autoconf.h ... done.
| make[4]: *** No rule to make target 'modules'.  Stop.
| Makefile.build:13: recipe for target 'modules' failed
| make[3]: *** [modules] Error 2
| Makefile.real:88: recipe for target 'modules' failed
| make[2]: *** [modules] Error 2
| Makefile:40: recipe for target 'modules' failed
| make[1]: *** [modules] Error 2
| Makefile:30: recipe for target 'default' failed
| make: *** [default] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located

According to your website “Driver backports are available for the following subsystems: Bluetooth […] Wireless” but i cannot find any backports for bluetooth in your repository “backports-toradex.git - Backports for Apalis and Colibri modules

To use backports with a mainline Linux kernel just does not make much sense. I would rather recommend you moving to a later mainline Linux kernel altogether. Of course, I don’t know nothing about your specific requirements and whether or not using a mainline Linux kernel will even be able to meet any of those. For our Toradex Easy Installer we e.g. long since moved to the following mainline aka upstream Linux kernel 5.4 based branch:

http://git.toradex.com/cgit/linux-toradex.git/log/?h=toradex_5.4.y

Hi @marcel.tx
I would love to use the 5.4 kernel as i have already tested it by using the BSP5.0 release and all my connected devices are working just fine. However, i am concerned to use a configuration that is not tagged as stable BSP LTS. Can i use the BSP 2.8 and just change the kernel branch? I am not sure if we can wait for the BSP5.0 LTS release. What would be the recommended way to use this specific kernel version?
What i do need is the RTW88 driver which was integrated into the kernel starting with version 5.2. Additionally K20 and USB3 and GEtherner have to work.

I tried to use the kernel recipes from BSP5.0 but unfortunately there are a lot of missing classes and stuff…

I guess easier would be to just change the branch in the existing BSP 2.8 recipe. Just make sure to also get rid of all them separate patches and use the proper defconfig.

Hi @marcel.tx,
Well, i am not an expert when it comes to modifying kernel recipes and unfortunately i cannot find the right place to specify the branch. In fact in the original mainline kernel recipe for the TK1 the sources are downloaded as tarball from cdn.kernel.org. Could you please provide me with more instructions and support?

Yes, you are, of course, right. You may find a suitable recipe as follows:

https://git.toradex.com/cgit/meta-toradex-bsp-common.git/tree/recipes-kernel/linux/linux-toradex-mainline_5.4.bb?h=thud

Plus its include file:

http://git.toradex.com/cgit/meta-toradex-bsp-common.git/tree/recipes-kernel/linux/linux-toradex-mainline.inc?h=thud

Actually, the only thing required to be changed, in your case, should be what version is considered here:

http://git.toradex.com/cgit/meta-toradex-tegra.git/tree/conf/machine/apalis-tk1-mainline.conf?h=thud#n14

Hi @marcel.tx
I have copied the mentioned files and modified the preferred bootloader but however, the build process fails with the message below.

NOTE: Executing RunQueue Tasks
ERROR: linux-toradex-mainline-5.4.28+gitAUTOINC+75b6d773f0-r0 do_configure: oe_runmake failed
ERROR: linux-toradex-mainline-5.4.28+gitAUTOINC+75b6d773f0-r0 do_configure: Function failed: do_configure (log file is located at /home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/temp/log.do_configure.13349)
ERROR: Logfile of failure stored in: /home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/temp/log.do_configure.13349
Log data follows:
| DEBUG: Executing python function check_oldest_kernel
| DEBUG: Python function check_oldest_kernel finished
| DEBUG: Executing shell function do_configure
| NOTE: make HOSTCC=gcc  -isystem/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/lib -L/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/lib -Wl,-O1 HOSTCPP=gcc  -E -C /home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/git O=/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/build oldnoconfig
| make: Entering directory '/home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source'
| make[1]: Entering directory '/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/build'
|   GEN     Makefile
|   HOSTCC  scripts/basic/fixdep
| make[2]: *** No rule to make target 'oldnoconfig'.  Stop.
| /home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source/Makefile:567: recipe for target 'oldnoconfig' failed
| make[1]: *** [oldnoconfig] Error 2
| make[1]: Leaving directory '/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/build'
| Makefile:179: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| make: Leaving directory '/home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source'
| NOTE: make HOSTCC=gcc  -isystem/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/lib -L/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/recipe-sysroot-native/lib -Wl,-O1 HOSTCPP=gcc  -E -C /home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/git O=/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/build oldconfig
| make: Entering directory '/home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source'
| make[1]: Entering directory '/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/build'
|   GEN     Makefile
|   HOSTCC  scripts/kconfig/conf.o
|   HOSTCC  scripts/kconfig/confdata.o
|   HOSTCC  scripts/kconfig/expr.o
|   LEX     scripts/kconfig/lexer.lex.c
|   YACC    scripts/kconfig/parser.tab.[ch]
|   HOSTCC  scripts/kconfig/lexer.lex.o
|   HOSTCC  scripts/kconfig/parser.tab.o
|   HOSTCC  scripts/kconfig/preprocess.o
|   HOSTCC  scripts/kconfig/symbol.o
|   HOSTLD  scripts/kconfig/conf
| scripts/kconfig/conf  --oldconfig Kconfig
| scripts/Kconfig.include:39:  gold linker 'arm-angstrom-linux-gnueabi-ld' not supported
| /home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source/scripts/kconfig/Makefile:73: recipe for target 'oldconfig' failed
| make[2]: *** [oldconfig] Error 1
| /home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source/Makefile:567: recipe for target 'oldconfig' failed
| make[1]: *** [oldconfig] Error 2
| make[1]: Leaving directory '/home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/build'
| Makefile:179: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| make: Leaving directory '/home/user/oe-core/build/tmp-glibc/work-shared/apalis-tk1-mainline/kernel-source'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/user/oe-core/build/tmp-glibc/work/apalis_tk1_mainline-angstrom-linux-gnueabi/linux-toradex-mainline/5.4.28+gitAUTOINC+75b6d773f0-r0/temp/log.do_configure.13349)
ERROR: Task (/home/user/oe-core/build/../layers/meta-konrad-rfct/recipes-kernel/linux/linux-toradex-mainline_5.4.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2264 tasks of which 2256 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
  /home/user/oe-core/build/../layers/meta-konrad-rfct/recipes-kernel/linux/linux-toradex-mainline_5.4.bb:do_configure
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Hm, could you try it with the following machine configuration instead?

Hi @marcel.tx ,
I have tried your machine configuration and the same error “| scripts/Kconfig.include:39: gold linker ‘arm-angstrom-linux-gnueabi-ld’ not supported” occurrs. In fact there are no real differences between the two machine configurations (i needed to change u-boot-toradex-tk1 to u-boot-toradex). Maybe its because those recipes are copied from “thud” branch which provides a different compiler set?

Ah, sorry, you are still using the BSP 2.8 Rocko stuff. Why not updating to our BSP 3.0.4 LTS?

Hi @marcel.tx ,
There were a lot of changes that Toradex introduced during the last months and we are not fully aware of implications when upgrading to BSP3.0.4LTS. According to your website the BSP3.0.4 is using the same kernel as BSP2.8 but the image is not based on Angstrom any more. So can we use the BSP 3.0.4 without Torizon, e.g. we want a image installable via TEZI as before? We are very interested into the upcoming 5.0 release, but can we rely on the website that this BSP will be released in October and will this be a stable release? We do only want to use stable releases to avoid support problems.

As you may imagine TK1 is not quite a focus of BSP 5.0 which is why I would suggest sticking to BSP 3.0.4 LTS for now.

Hi @marcel.tx
I was able to create an image based on BSP3.0.4LTS with slightly changes to the kernel recipe to use the 5.4 mainline kernel as you suggested. Everything looks okay, no backports needed and all of my devices seem to be functional. I will run some extended verifiction tests but so long, thanks for your support!