Hi,
yet another email to spam you more....
I propose to have an Android DT overlay presentation next call and add topics that may arise from the list. Should you think we should discuss a particular topic, please respond to this mail thread.
Cordially,
Francois-Frederic
Android DT overlay presentation next call
If folks are interested and time permits, i would like to demo - Device Tree Visualiser.
It is a tool i have written to manage complex hierarchies of device trees. (like the ones in Android / OEM vendor trees)
A brief intro and a static screenshot is available here : https://www.spinics.net/lists/devicetree-spec/msg00950.html
regards CVS
On Wed, 13 May 2020 at 20:48, CVS cvs268@gmail.com wrote:
Android DT overlay presentation next call
If folks are interested and time permits, i would like to demo - Device Tree Visualiser.
It is a tool i have written to manage complex hierarchies of device trees. (like the ones in Android / OEM vendor trees)
I've personally been raising the issue that it's hard to get the true picture of a DT configuration. It seems like your DTV tool partly takes care of that, so, I'd be interested.
A brief intro and a static screenshot is available here : https://www.spinics.net/lists/devicetree-spec/msg00950.html
Looking good!
regards CVS
Regards, Joakim
On 13/05/2020 19:48, CVS wrote:
Android DT overlay presentation next call
If folks are interested and time permits, i would like to demo - Device Tree Visualiser.
It is a tool i have written to manage complex hierarchies of device trees. (like the ones in Android / OEM vendor trees)
A brief intro and a static screenshot is available here : > https://www.spinics.net/lists/devicetree-spec/msg00950.html
This is very interesting. Do you have a public git tree you can point me at?
g.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
A brief intro and a static screenshot is available here : https://www.spinics.net/lists/devicetree-spec/msg00950.html
This is very interesting. Do you have a public git tree you can point me at?
Unfortunately, not yet. The PoC in the screenshot is just ~200 lines of python though. I would like to rewrite it *cleanly* from scratch over a weekend.
If the general consensus is that DTV is worth pursuing, i would like to develop this properly in public. Maybe somewhere like https://github.com/devicetree-org
One open concern i have is whether the use of Qt places any undesirable licensing restrictions in distributing/adopting such a DTV tool within the various projects/frameworks that use device-trees.
Also i would like some feedback on the design of this tool. I will get back with a slide-deck in a couple of days describing the clean design i have in mind for DTV.
regards CVS
On 14/05/2020 12:24, CVS wrote:
A brief intro and a static screenshot is available here : https://www.spinics.net/lists/devicetree-spec/msg00950.html
This is very interesting. Do you have a public git tree you can point me at?
Unfortunately, not yet. The PoC in the screenshot is just ~200 lines of python though. I would like to rewrite it *cleanly* from scratch over a weekend.
If the general consensus is that DTV is worth pursuing, i would like to develop this properly in public. Maybe somewhere like https://github.com/devicetree-org
I'd be happy to host it on devicetree-org. I'd like to see the project first. Can you publish to a personal github tree to get it out there for feedback. It can easily be moved to the devicetree-org group later.
Don't worry about getting it perfect or pretty. Just get it out there as a starting point.
One open concern i have is whether the use of Qt places any undesirable licensing restrictions in distributing/adopting such a DTV tool within the various projects/frameworks that use device-trees.
Should be fine if it works with the open source Qt versions.
g. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Don't worry about getting it perfect or pretty. Just get it out there as a starting point.
OK. Here goes... https://github.com/TheCodeArtist/dtv-demo/
Verified on Ubuntu 18.04 with python3.4 and PyQt 5.13.0
pip3 install pyqt5 python3 dtv.py File -> Open Select a *.dts under <kernel-dir>/arch/arm64/boot/dts/ Resize the various columns to view content
For a good idea of where DTV would shine, open a DTS file that directly/indirectly includes a lot of dtsi files. (upstream kernel tree has "qcom" and "freescale" in arch/arm64/boot/dts/)
For "complex" repositories, one needs to perform an one-time setup:
- update "baseDir" detection logic: https://github.com/TheCodeArtist/dtv-demo/blob/af4d41445c8eeb7884bd480367206...
- add *ALL* the include paths (relative to baseDir) https://github.com/TheCodeArtist/dtv-demo/blob/af4d41445c8eeb7884bd480367206...
...and here's the slide-deck i promised earlier https://docs.google.com/presentation/d/1QGyxRC8Mx9biBM951uXPPVVnrtGdQSmyMpMm...
Not sure how well i have been able to get my thoughts across. Give this dtv-demo a try if you like. I will be glad to answer any questions...
regards CVS
Visualised a few of the arm64 DTS files located in https://github.com/devicetree-org/devicetree-source Also verified dtv-demo on a fresh PC.
Couple of tweaks to the demo were required...
1. Modify dtv.py to support the layout of the devicetree-source repo - baseDir = re.search('^.*(?=arch/arm)', dtsFile) + baseDir = re.search('^.*(?=src/arm)', dtsFile)
2. Set executable permissions (if not set upon git clone to a fresh PC) chmod +x ./dtc ./dtv.py
3. Visualise DTS files under devicetree-source-repo/src/arm64/ python3 dtv.py File -> Open Select a dts file under devicetree-source-repo/src/arm64/
regards CVS
On 16/05/2020 11:16, CVS wrote:
Visualised a few of the arm64 DTS files located in https://github.com/devicetree-org/devicetree-source Also verified dtv-demo on a fresh PC.
Couple of tweaks to the demo were required...
Modify dtv.py to support the layout of the devicetree-source repo
- baseDir = re.search('^.*(?=arch/arm)', dtsFile)
- baseDir = re.search('^.*(?=src/arm)', dtsFile)
Set executable permissions (if not set upon git clone to a fresh PC) chmod +x ./dtc ./dtv.py
Visualise DTS files under devicetree-source-repo/src/arm64/ python3 dtv.py File -> Open Select a dts file under devicetree-source-repo/src/arm64/
I gave it a try, and it would list a subset of the dts and dtsi files in the left hand column, but nothing came up on the right hand side. What am I missing?
g. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
but nothing came up on the right hand side
Hmmm... Sorry about that.
There are these 2 commands that the dtv-demo executes behind the scenes to gather the necessary information. One (or both) of them could be failing. Here is a patch that logs those 2 complete commands with the actual arguments.
Try re-running dtv-demo with this patch applied. Once you have these 2 logs (say cmdX and cmdY), you can try manually running them by piping the output of the first command to the second i.e. cmdX | cmdY to identify and fix whatever is necessary on the system.
If you find that you are having issues running the pre-compiled dtc binary within dtv-demo, please feel free to replace it with any recent dtc binary on your system which supports the -T cmd-line parameter.
@@ -115,11 +115,13 @@ def annotateDTS(trwIncludedFiles, dtsFile): # cpp ${cpp_flags} ${cpp_includes} ${dtx} | ${DTC} ${dtc_flags} ${dtc_include} -I dts cpp = 'cpp ' cppFlags += '-nostdinc -undef -D__DTS__ -x assembler-with-cpp ' + print(cpp + cppFlags + cppIncludes + ' ' + dtsFile) cppResult = subprocess.run(cpp + cppFlags + cppIncludes + ' ' + dtsFile, stdout=PIPE, stderr=PIPE, shell=True)
dtc = './dtc ' dtcFlags = '-I dts -O dts -f -s -T -T -o - ' + print(dtc + dtcFlags + dtcIncludes) dtcResult = subprocess.run(dtc + dtcFlags + dtcIncludes, stdout=PIPE, stderr=PIPE, input=cppResult.stdout, shell=True)
# Create a temporary file in the current working directory
I hope this helps...
regards CVS
On Mon, May 18, 2020 at 10:12:59PM +0530, CVS wrote:
but nothing came up on the right hand side
Hmmm... Sorry about that.
I had the same issue initially, but I believe doing 'chmod' did the job. I now have dtv-demo up and running. I think this tool and the idea is a really great thing, thanks!
On 18/05/2020 17:42, CVS wrote:
but nothing came up on the right hand side
Hmmm... Sorry about that.
Turns out problem was on my side. I didn't want to use the precompiled dtc binary in the repo, so I removed it and just used the Debian packaged dtc which didn't work. Building mainline dtc and using that worked a treat.
I really like the tool. I think it is very useful. I'd be happy to host it somewhere under github/devicetree_org, but alternately it could be included in the main dtc repo which will give the tool wider reach.
Cheers, g.
There are these 2 commands that the dtv-demo executes behind the scenes to gather the necessary information. One (or both) of them could be failing. Here is a patch that logs those 2 complete commands with the actual arguments.
Try re-running dtv-demo with this patch applied. Once you have these 2 logs (say cmdX and cmdY), you can try manually running them by piping the output of the first command to the second i.e. cmdX | cmdY to identify and fix whatever is necessary on the system.
If you find that you are having issues running the pre-compiled dtc binary within dtv-demo, please feel free to replace it with any recent dtc binary on your system which supports the -T cmd-line parameter.
@@ -115,11 +115,13 @@ def annotateDTS(trwIncludedFiles, dtsFile): # cpp ${cpp_flags} ${cpp_includes} ${dtx} | ${DTC} ${dtc_flags} ${dtc_include} -I dts cpp = 'cpp ' cppFlags += '-nostdinc -undef -D__DTS__ -x assembler-with-cpp '
print(cpp + cppFlags + cppIncludes + ' ' + dtsFile) cppResult = subprocess.run(cpp + cppFlags + cppIncludes + ' ' + dtsFile, stdout=PIPE, stderr=PIPE, shell=True)
dtc = './dtc ' dtcFlags = '-I dts -O dts -f -s -T -T -o - '
print(dtc + dtcFlags + dtcIncludes) dtcResult = subprocess.run(dtc + dtcFlags + dtcIncludes,
stdout=PIPE, stderr=PIPE, input=cppResult.stdout, shell=True)
# Create a temporary file in the current working directory
I hope this helps...
regards CVS
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
boot-architecture@lists.linaro.org