How to port my imx6 customized device tree when yocto linux kernel version updates

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

How to port my imx6 customized device tree when yocto linux kernel version updates

2,602 次查看
edward_fu
Contributor III

Hi all,

When updating yocto linux kernel version, usually the dts and dtsi(imx6qdl.dtsi  imx6qdl-sabresd.dtsi  imx6q.dtsi  imx6q-sabresd.dts) will be modified greately, but I still want to use my own dtb and dtsi. even though it builds wiought error. But the system crashed in kernel stage. I am sure it is because of dts and dtsi issue, but it is hard to figure out.

So usually how to port my imx6 customized device tree when yocto linux kernel version updates?

My customised dts and dtsi(imx6qdl.dtsi  imx6qdl-sabresd.dtsi  imx6q.dtsi  imx6q-sabresd.dts) are in:

meta-customised-layer/recipes-kernel/linux/files/dts/ directory.

And my linux

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://dts/imx6qdl.dtsi \
file://dts/imx6qdl-sabresd.dtsi \
file://dts/imx6q.dtsi \
file://dts/imx6q-sabresd.dts \
"

inherit pkgconfig

do_apply_custom_dist_conf() {
# Adding device tree files to kernel sources
# Create directory first
install -d ${D}


cp -rf ${WORKDIR}/dts/* ${D}/../git/arch/arm/boot/dts
}

addtask apply_custom_dist_conf before do_patch after do_unpack

标签 (2)
标记 (2)
0 项奖励
回复
3 回复数

2,421 次查看
kunalkotecha1
Senior Contributor II

Hi edward.fu@tomra.com ,

If you are updating the Linux kernel version, you might be getting crash, as updated kernel is expecting something from DTS, which is present in its base DTS. So, you need to make your custom changes of dts to the base updated linux kernel version's dts. Then you can have that dts in your custom meta-layer.

Please let us know in case of any concerns.

Regards,

Kunal

0 项奖励
回复

2,421 次查看
edward_fu
Contributor III

Thank you for your reply.

I know what you mean. In my new kernel version, I used my custom DTS not the new kernel base DTS, and my custom DTS was still my old custom DTS.

You can see my custom meta-layer, .bbappend like below:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://dts/imx6qdl.dtsi \
file://dts/imx6qdl-sabresd.dtsi \
file://dts/imx6q.dtsi \
file://dts/imx6q-sabresd.dts \
"

inherit pkgconfig

do_apply_custom_dist_conf() {
# Adding device tree files to kernel sources
# Create directory first
install -d ${D}


cp -rf ${WORKDIR}/dts/* ${D}/../git/arch/arm/boot/dts
}

addtask apply_custom_dist_conf before do_patch after do_unpack

In short, what is the general practices about the DTS and kernel config when updating linux kernel version?

Because when updating linux kernel version, a lot of kernel configs have been changed, can I use my old custom kernel config to generate new kernel config?

Now my problem happens, I don't know how to figure out where the issue is. My board crashed when starting kernel for a few seconds.

0 项奖励
回复

2,421 次查看
kunalkotecha1
Senior Contributor II

Hi edward.fu@tomra.com ,

I would suggest to apply your custom changes on the base of new linux kernel. You need to check the base config file of the new kernel and make your changes their and take the changes , put it in your bbappend. Similarly, on the base DTS make your changes and take that as your new dts.

Shortly, you need to apply your changes on the base version.

Regards,

Kunal