Compile Linux kernel for i.MX6QP

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Compile Linux kernel for i.MX6QP

跳至解决方案
3,718 次查看
niklasmolin
Senior Contributor I

Hi.

I'm compiling the Linux kernel for the i.mx6 from github.com/torvalds/linux (version 4.14).

I have the .dtb files for both version.

It will run on an i.MX6D but when I try to run the same kernel on an i.MX6QP, the kernel won't start.

If I compile in Yocto (Rocko version, it will run on both types).

Is there something I need to enable in the kernel code for it to run on an i.MX6QP?

Thanks,

Niklas

标签 (3)
0 项奖励
回复
1 解答
2,948 次查看
niklasmolin
Senior Contributor I

I managed to figure it out.

I had to update the u-boot to 2017 (used 2015).

在原帖中查看解决方案

0 项奖励
回复
6 回复数
2,948 次查看
csoapy
Contributor III

Please refer to this:i.MX6: Using kernel from Linus mainline instead of Freescale git 

I tried linux 4.18-rc3 from torvalds, and found that there are some clock missing in cpu node in device tree! that's why it failed to start!

I'm confused to NXP, why they are not so open to mainline linux source code?

0 项奖励
回复
2,948 次查看
woutervh
Contributor IV

Can you explain what you had to add to the cpu node? As I'm also trying linux 4.18 on my imx6q board, but it doesn't boot... My uboot is old (2016.03) but I prefer to keep it, as it's working...

0 项奖励
回复
2,948 次查看
csoapy
Contributor III

Well, sorry I forget the details, but following steps would help us to find what we need exactly.

  1. make myboard.dtb file both in linux 4.18 and fsl_imx_linux
  2. use pyfdt to decompile  them to dtc
  3. compare node structures in dtc  side by side, you will found what's missing in mainline stream

And, it's better to remove phandle=xxx in dtc file generated in step2, since they should be different in different versions and result in a mess in diff view 

0 项奖励
回复
2,948 次查看
joanxie
NXP TechSupport
NXP TechSupport

how did you compile the kernel for mx6d and imx6qp? if you need to build the kernel for imx6qp, when you bitbake, you need to choose the imx6qp board, then compile and build again, did you try this?

0 项奖励
回复
2,949 次查看
niklasmolin
Senior Contributor I

I managed to figure it out.

I had to update the u-boot to 2017 (used 2015).

0 项奖励
回复
2,948 次查看
woutervh
Contributor IV

Why? Why does the bootloader version makes a difference?

0 项奖励
回复