How to download the kernel source for a particular BSP


I am using BSP 5.4.1 and want to customize only the kernel. I ran into a strange problem there.

repo init -u -b refs/tags/5.4.1 -m tdxref/default.xml

I created a zImage using “toradex_5.4-2.1.x-imx”, but it behaves differently from the kernel included in BSP 5.4.1. Is there a way to get the 5.4.129 kernel included in BSP 5.4.1 from git?

git clone -b toradex_5.4-2.1.x-imx git://

git clone -b toradex_5.4.129.x-imx??? git://

The problem is the zImage created with “toradex_5.4-2.1.x-imx” and “toradex_5.4-2.3.x-imx”. It does not comply with DTBO and spidev3.0 is not enabled.

mcp251x0 is disabled, ecspi4 and spidev0 are enabled, and DTBO is normal.

Linux/arm 5.4.77 Kernel(toradex_5.4-2.1.x-imx) #Spidev3.0 does not follow DTBO and is invalid.
Linux/arm 5.4.129 Kernel (BSP5.4.1) #Spidev3.0 is valid according to DTBO.
Linux/arm 5.4.154 Kernel(toradex_5.4-2.3.x-imx) #Spidev3.0 does not follow DTBO and is invalid.

I would appreciate any advice. (96.2 KB)

Hi @yoshida , Linux BSP 5.4 uses toradex_5.4-2.3.x-imx branch. Please download it by the following command. git clone -b toradex_5.4-2.3.x-imx git://
To check out the same version of kernel as BSP 5.4.1, you can find the commit hash value by uname -a on Colibri iMX6 with BSP 5.4.1 installed.

Hi @benjamin.tx ,Thank you for your response.

The result of “uname-a” is “Linux colibri-imx6-107161415.4.129-5.4.0-devel + git.cb88cc157bfb # 1 SMP Wed Sep 29 18:17:21 UTC 2021 armv7l armv7l armv7l GNU / Linux”

git init
git remote add origin git://
git fetch --depth 1 origin 5.4.129-5.4.0-devel+git.cb88cc157bfb
git checkout FETCH_HEAD

Can I get the desired kernel source with the above sequence?

Hi @yoshida , I think it could work. Or you may just check out to the desired commit. git checkout cb88cc157bfb

1 Like

Hi @benjamin.tx ,I was able to successfully download the same version of the kernel as the BSP. thank you.

The symptom of not seeing Spidev3.0 has not been resolved, but the download issue has been resolved.

git init
git remote add origin git://
git fetch
git checkout cb88cc157bfb

Hi @yoshida , with Linux 5.4.129, is the spidev3.0 not listed under /dev ? Could you please post your device tree overlays source file here?

Hi @benjamin.tx
I have attached a device tree overlay file. I would appreciate it if you could confirm it.

Is there a problem with a different compiler version? You are using the officially announced compiler version.

[BSP5.4 Linux 5.4.129]
Compiler: arm-tdx-linux-gnueabi-gcc (GCC) 9.3.0

[user Linux 5.4.129]
arm-none-linux-gnueabihf-gcc 9.2.1

  • For 32 bit Arm: gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz

colibri-imx6_hdmi_overlay.dtbo (1.0 KB)
colibri-imx6_hdmi_overlay.dts (480 Bytes)
colibri-imx6-eval_spidev_overlay.dtbo (525 Bytes)
colibri-imx6-eval_spidev_overlay.dts (320 Bytes)
overlays.txt (83 Bytes)

Hi @benjamin.tx

The problem seems simple. When I checked, the name of “uname-a” was different. Can they have the same name?


Seems like a problem because it doesn’t match the name called by the lib module.


[user Linux 5.4.129]

Hi @yoshida , if only the spi is going to be enabled by device tree overlay, you don’t need to download and compile kernel, just activate colibri-imx6-eval_spidev_overlay.dtbo in /boot/overlays.txt

root@colibri-imx6:~# cat /boot/overlays.txt 
root@colibri-imx6:~# ls /dev/|grep spi

Since it is now your customized kernel 5.4.129-37365-gcb88cc157bfb-dirty, kernel modules need to be built and deployed against your kernel source code. This is how to build them.

Hi @benjamin.tx ,Thank you for your accurate support. All the problems have been solved.