How to build device tree changes?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to build device tree changes?

Jump to solution
1,945 Views
chillinwithscb
Contributor III

IMX8M Nano

Yocto build setup from NXP

I want to build a modified device tree for the imx8m nano. I understand the syntax of device tree source files (.dts, dtsi), but I don't know how to get the yocto build to update the DTB: imx8mn-evk.dtb.

I modified imx8mn-evk.dts and built, but my changes do not seem to affect the build. As a test I simply typed garbage into the file and even renamed the file. I expected the build to fail, but no it doesn't. Thing is there's many copies of this file in my build tree. I picked the one under nano/tmp/work-shared/imx8mn-lpddr4-evk/kernel-source/arch/arm64/boot/dts/freescale/ where nano is my build dir. I realize that the files under tmp are only quasi-source files. They come from somewhere else. Maybe modifying them under tmp does not automatically cause the build to see the change. Or I have modified the wrong copy of the file. Or I selected the wrong target to build. I did "bitbake core-image-minimal" thinking that would be good.

IDK whether this is a general yocto issue or something particular to the IMX yocto build. FYI Yocto makes little sense to me in general.

How do I get the yocto build to build changes to the device tree?

Tags (3)
0 Kudos
Reply
1 Solution
1,925 Views
Chavira
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
2 Replies
1,926 Views
Chavira
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
1,911 Views
chillinwithscb
Contributor III

The info in the link How-to-compile-Linux-Kernel-Image-and-device-tree-using-Yocto is good. I actually had already found that info in NXP docs. But it's spread across two docs. The linked article is a more concise and direct description of the steps. 

That said, it was not clear to me from the NXP docs or the article _why_ I'd want to use a standalone build or why it so very complicated to setup. But, I see the value of the standalone build now. And I was able to build an updated DTB.

Thanks.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2043579%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20build%20device%20tree%20changes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2043579%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIMX8M%20Nano%3C%2FP%3E%3CP%3EYocto%20build%20setup%20from%20NXP%3C%2FP%3E%3CP%3EI%20want%20to%20build%20a%20modified%20device%20tree%20for%20the%20imx8m%20nano.%26nbsp%3BI%20understand%20the%20syntax%20of%20device%20tree%20source%20files%20(.dts%2C%20dtsi)%2C%20but%20I%20don't%20know%20how%20to%20get%20the%20yocto%20build%20to%20update%20the%20DTB%3A%20imx8mn-evk.dtb.%3C%2FP%3E%3CP%3EI%20modified%26nbsp%3Bimx8mn-evk.dts%20and%20built%2C%20but%20my%20changes%20do%20not%20seem%20to%20affect%20the%20build.%20As%20a%20test%20I%20simply%20typed%20garbage%20into%20the%20file%20and%20even%20renamed%20the%20file.%20I%20expected%20the%20build%20to%20fail%2C%20but%20no%20it%20doesn't.%20Thing%20is%20there's%20many%20copies%20of%20this%20file%20in%20my%20build%20tree.%20I%20picked%20the%20one%20under%26nbsp%3Bnano%2Ftmp%2Fwork-shared%2Fimx8mn-lpddr4-evk%2Fkernel-source%2Farch%2Farm64%2Fboot%2Fdts%2Ffreescale%2F%20where%20nano%20is%20my%20build%20dir.%20I%20realize%20that%20the%20files%20under%20tmp%20are%20only%20quasi-source%20files.%20They%20come%20from%20somewhere%20else.%20Maybe%20modifying%20them%20under%20tmp%20does%20not%20automatically%20cause%20the%20build%20to%20see%20the%20change.%20Or%20I%20have%20modified%20the%20wrong%20copy%20of%20the%20file.%20Or%20I%20selected%20the%20wrong%20target%20to%20build.%20I%20did%20%22bitbake%20core-image-minimal%22%20thinking%20that%20would%20be%20good.%3C%2FP%3E%3CP%3EIDK%20whether%20this%20is%20a%20general%20yocto%20issue%20or%20something%20particular%20to%20the%20IMX%20yocto%20build.%20FYI%20Yocto%20makes%20little%20sense%20to%20me%20in%20general.%3C%2FP%3E%3CP%3EHow%20do%20I%20get%20the%20yocto%20build%20to%20build%20changes%20to%20the%20device%20tree%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2043579%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2044771%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20build%20device%20tree%20changes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2044771%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThe%20info%20in%20the%20link%26nbsp%3BHow-to-compile-Linux-Kernel-Image-and-device-tree-using-Yocto%20is%20good.%20I%20actually%20had%20already%20found%20that%20info%20in%20NXP%20docs.%20But%20it's%20spread%20across%20two%20docs.%20The%20linked%20article%20is%20a%20more%20concise%20and%20direct%20description%20of%20the%20steps.%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20said%2C%20it%20was%20not%20clear%20to%20me%20from%20the%20NXP%20docs%20or%20the%20article%20_why_%20I'd%20want%20to%20use%20a%20standalone%20build%20or%20why%20it%20so%20very%20complicated%20to%20setup.%20But%2C%20I%20see%20the%20value%20of%20the%20standalone%20build%20now.%20And%20I%20was%20able%20to%20build%20an%20updated%20DTB.%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2043712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20build%20device%20tree%20changes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2043712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F228561%22%20target%3D%22_blank%22%3E%40chillinwithscb%3C%2FA%3E!%3CBR%20%2F%3EThank%20you%20for%20contacting%20NXP%20Support!%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20follow%20the%20next%20posts%20to%20solve%20the%20problem.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FHow-to-compile-Linux-Kernel-Image-and-device-tree-using-Yocto%2Fta-p%2F2022759%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FHow-to-compile-Linux-Kernel-Image-and-device-tree-using-Yocto%2Fta-p%2F2022759%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FHow-to-use-Devshell-to-compile-device-tree-files%2Fta-p%2F1727428%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FHow-to-use-Devshell-to-compile-device-tree-files%2Fta-p%2F1727428%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards!%3C%2FP%3E%0A%3CP%3EChavira%3C%2FP%3E%3C%2FLINGO-BODY%3E