Difference between revisions of "Device Tree frowand"

From eLinux.org
Jump to: navigation, search
(add devicetree man pages and how to download and install; or download patches and build)
(Updates on tools shown in the talk: add dtc --annotate, dtx_diff --annotate merge versions)
(9 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
[[Device_Tree | Top Device Tree page]]
 
[[Device_Tree | Top Device Tree page]]
  
== Device Tree stuff from Frank Rowand ==
+
Device Tree stuff from Frank Rowand
  
=== Resources for "Solving Device Tree Issues" talk ===
+
== Resources for "Solving Device Tree Issues" talk ==
  
==== Updates on tools shown in the talk ====
+
=== Updates on tools shown in the talk ===
 
<tt><pre>
 
<tt><pre>
 
dtdiff          - in linux source tree as scripts/dtc/dtx_diff,  merged 4.6-rc1
 
dtdiff          - in linux source tree as scripts/dtc/dtx_diff,  merged 4.6-rc1
 +
                - --annotate merged 5.0-rc1
  
dtc --annotate  - remains a proof of concept
+
dtc --annotate  - in linux source tree, merged 5.0-rc1
  
 
dt_node_info    - remains a proof of concept
 
dt_node_info    - remains a proof of concept
 
dt_stat
 
dt_stat
  
dt_to_config    - vastly improved, nearly ready to submit
+
dt_to_config    - vastly improved, upstream in Linux 4.8-rc1
 
</pre></tt>
 
</pre></tt>
  
Line 22: Line 23:
 
is [https://github.com/frowand/serio serio].
 
is [https://github.com/frowand/serio serio].
  
==== Embedded Linux Conference Europe (ELCE) - October 6, 2015 ====
+
=== Embedded Linux Conference Europe (ELCE) - October 6, 2015 ===
  
 
* [[Media:Dt_debugging_elce_2015_151006_0421.pdf | PDF slides, as presented ]]
 
* [[Media:Dt_debugging_elce_2015_151006_0421.pdf | PDF slides, as presented ]]
Line 33: Line 34:
 
** Version 150811_1802 had a fatal bug.  Fixed in version 150918_2310.
 
** Version 150811_1802 had a fatal bug.  Fixed in version 150918_2310.
 
* [[Media:Print_property_access_150811_1802.patch | Kernel changes to add debug messages needed by the dt_prop script.]]
 
* [[Media:Print_property_access_150811_1802.patch | Kernel changes to add debug messages needed by the dt_prop script.]]
 +
** [[#Resources_for_.22Solving_Device_Tree_Issues_-_Part_3.22_talk | newer version of kernel changes for dt_prop]] in "Solving Device Tree Issues - Part 3".
 
* [[Media:Get_fdt_and_edt_over_serial_console.txt | notes on how to upload FDT and EDT from a target over a serial console (150531_0029)]]
 
* [[Media:Get_fdt_and_edt_over_serial_console.txt | notes on how to upload FDT and EDT from a target over a serial console (150531_0029)]]
  
==== Linuxcon North America / Linux Plumbers Conference refereed track - August 19, 2015 ====
+
=== Linuxcon North America / Linux Plumbers Conference refereed track - August 19, 2015 ===
  
 
* [[Media:Dt_debugging_lcna_2015.pdf | PDF slides ]]
 
* [[Media:Dt_debugging_lcna_2015.pdf | PDF slides ]]
Line 43: Line 45:
 
** Version 150811_1802 had a fatal bug.  Fixed in version 150918_2310.
 
** Version 150811_1802 had a fatal bug.  Fixed in version 150918_2310.
 
* [[Media:Print_property_access_150811_1802.patch | Kernel changes to add debug messages needed by the dt_prop script.]]
 
* [[Media:Print_property_access_150811_1802.patch | Kernel changes to add debug messages needed by the dt_prop script.]]
 +
** [[#Resources_for_.22Solving_Device_Tree_Issues_-_Part_3.22_talk | newer version of kernel changes for dt_prop]] in "Solving Device Tree Issues - Part 3".
 
* [[Media:Get_fdt_and_edt_over_serial_console.txt | notes on how to upload FDT and EDT from a target over a serial console (150531_0029)]]
 
* [[Media:Get_fdt_and_edt_over_serial_console.txt | notes on how to upload FDT and EDT from a target over a serial console (150531_0029)]]
  
==== LinuxCon Japan - June 4, 2015 ====
+
=== LinuxCon Japan - June 4, 2015 ===
  
 
* [[Media:Dt_debugging_lcj_2015.pdf | PDF slides ]]
 
* [[Media:Dt_debugging_lcj_2015.pdf | PDF slides ]]
Line 52: Line 55:
 
* [[Media:Get_fdt_and_edt_over_serial_console.txt | notes on how to upload FDT and EDT from a target over a serial console (150531_0029)]]
 
* [[Media:Get_fdt_and_edt_over_serial_console.txt | notes on how to upload FDT and EDT from a target over a serial console (150531_0029)]]
  
=== devicetree man pages ===
+
== Resources for "Solving Device Tree Issues - Part 2" talk ==
 +
 
 +
dt_to_config <strike>is not upstream yet</strike> is upstream in Linux 4.8-rc1.  It is also available here:
 +
* [[Media:Dt_to_config_160718_1640.tar | tar of scripts/dtc/dt_to_config ]]
 +
 
 +
dt_to_config requires scripts/dtc/dtx_diff, which is available in Linux 4.6-rc1 and later.
 +
 
 +
== Resources for "Solving Device Tree Issues - Part 3" talk ==
 +
 
 +
* [[Media:Patches 161003 1822.tar | tar of patches ]] to patch <strike>4.7-rc7</strike> 4.8-rc7 kernel and to create dt_prop and dts_diff.
 +
 
 +
== devicetree man pages ==
  
 
man pages for devicetree are a work in progress.  This is a workspace to hold
 
man pages for devicetree are a work in progress.  This is a workspace to hold
Line 61: Line 75:
  
 
The current version of the man pages is:
 
The current version of the man pages is:
 +
 +
* [[Media:Docbook_devicetree_160620_0145.tar | 160620_0145 tar]]
 +
** Adds rest of of/drivers/*.c
 +
 
* [[Media:Docbook_devicetree_160613_1940.tar | 160613_1940 tar]]
 
* [[Media:Docbook_devicetree_160613_1940.tar | 160613_1940 tar]]
 
** of/drivers/address.c
 
** of/drivers/address.c
Line 72: Line 90:
 
* via the man command.
 
* via the man command.
  
==== installing and using the html man pages ====
+
=== installing and using the html man pages ===
  
 
create a location to download and install
 
create a location to download and install
Line 82: Line 100:
 
** cd ${dest}
 
** cd ${dest}
  
Download [[Media:Docbook_devicetree_160613_1940.tar | the tar]] containing the html tar,
+
Download [[Media:Docbook_devicetree_160620_0145.tar | the tar]] containing the html tar,
 
the man tar, and the patches tar to the current directory
 
the man tar, and the patches tar to the current directory
  
 
unpack the individual tars from the bundle
 
unpack the individual tars from the bundle
* tar -xf Docbook_devicetree_160613_1940.tar
+
* tar -xf Docbook_devicetree_160620_0145.tar
 
unpack the html tar
 
unpack the html tar
* tar -xf docbook_devicetree_html_160613_1940.tgz
+
* tar -xf docbook_devicetree_html_160620_0145.tgz
 
determine the URL to use to access the man pages
 
determine the URL to use to access the man pages
 
* echo "file://${dest}/devicetree.html"
 
* echo "file://${dest}/devicetree.html"
 
enter the above URL in your favorite browser
 
enter the above URL in your favorite browser
  
==== installing and using the man command pages ====
+
=== installing and using the man command pages ===
  
 
create a location to download and install
 
create a location to download and install
Line 103: Line 121:
 
** cd ${dest}
 
** cd ${dest}
  
Download [[Media:Docbook_devicetree_160613_1940.tar | the tar]] containing the html tar,
+
Download [[Media:Docbook_devicetree_160620_0145.tar | the tar]] containing the html tar,
 
the man tar, and the patches tar to the current directory
 
the man tar, and the patches tar to the current directory
  
 
unpack the individual tars from the bundle
 
unpack the individual tars from the bundle
* tar -xf Docbook_devicetree_160613_1940.tar
+
* tar -xf Docbook_devicetree_160620_0145.tar
 
unpack the man tar
 
unpack the man tar
* tar -xf docbook_devicetree_man_160613_1940.tgz
+
* tar -xf docbook_devicetree_man_160620_0145.tgz
 
create the directory tree that the man command expects
 
create the directory tree that the man command expects
 
* ln -s devicetree man/man9
 
* ln -s devicetree man/man9
Line 124: Line 142:
 
   man of_node_put
 
   man of_node_put
  
==== installing the source patches and building the docbook results ====
+
=== installing the source patches and building the docbook results ===
  
 
If you want to compile the docbook results yourself, do the following.
 
If you want to compile the docbook results yourself, do the following.
Line 137: Line 155:
 
** git checkout v4.7-rc2
 
** git checkout v4.7-rc2
  
Download [[Media:Docbook_devicetree_160613_1940.tar | the tar]] containing the html tar,
+
Download [[Media:Docbook_devicetree_160620_0145.tar | the tar]] containing the html tar,
 
the man tar, and the patches tar to the current directory
 
the man tar, and the patches tar to the current directory
  
 
Unpack the individual tars from the bundle
 
Unpack the individual tars from the bundle
* tar -xf Docbook_devicetree_160613_1940.tar
+
* tar -xf Docbook_devicetree_160620_0145.tar
  
 
Unpack the source patches tar
 
Unpack the source patches tar
* tar -xf docbook_devicetree_patch_160613_1940.tgz
+
* tar -xf docbook_devicetree_patch_160620_0145.tgz
  
 
Apply the patches
 
Apply the patches
Line 160: Line 178:
 
The generated objects will be under the build directory ../build/Documentation/DocBook/
 
The generated objects will be under the build directory ../build/Documentation/DocBook/
  
=== image test ===
+
== image test ==
  
 
[[File:For elinux DSC 0351.jpg | right | 484px | flowers in the desert]]
 
[[File:For elinux DSC 0351.jpg | right | 484px | flowers in the desert]]
Line 172: Line 190:
 
<br clear=all>
 
<br clear=all>
  
=== temporary parking spot ===
+
== temporary parking spot ==
  
 
Links to pages that are under construction, so that the pages will not get deleted.
 
Links to pages that are under construction, so that the pages will not get deleted.

Revision as of 13:26, 9 April 2019


Top Device Tree page

Device Tree stuff from Frank Rowand

Resources for "Solving Device Tree Issues" talk

Updates on tools shown in the talk

dtdiff           - in linux source tree as scripts/dtc/dtx_diff,  merged 4.6-rc1
                 - --annotate merged 5.0-rc1

dtc --annotate   - in linux source tree, merged 5.0-rc1

dt_node_info     - remains a proof of concept
dt_stat

dt_to_config     - vastly improved, upstream in Linux 4.8-rc1

Another option for uploading FDT and EDT from a target over a serial console is serio.

Embedded Linux Conference Europe (ELCE) - October 6, 2015

Linuxcon North America / Linux Plumbers Conference refereed track - August 19, 2015

LinuxCon Japan - June 4, 2015

Resources for "Solving Device Tree Issues - Part 2" talk

dt_to_config is not upstream yet is upstream in Linux 4.8-rc1. It is also available here:

dt_to_config requires scripts/dtc/dtx_diff, which is available in Linux 4.6-rc1 and later.

Resources for "Solving Device Tree Issues - Part 3" talk

  • tar of patches to patch 4.7-rc7 4.8-rc7 kernel and to create dt_prop and dts_diff.

devicetree man pages

man pages for devicetree are a work in progress. This is a workspace to hold current progress until the work is mainlined. Source files are being added to the list of files processed by docbook as the docbook comments in the source files are updated. man pages are not created for source files that have not been audited.

The current version of the man pages is:

The man pages are created from the docbook comments in the Linux kernel source.

The man pages are available in two formats

  • html
  • via the man command.

installing and using the html man pages

create a location to download and install

  • pick a location, I use 'me/devicetree_docs'
    • dest_relative="me/devicetree_docs"
  • create the location
    • dest="$(pwd)/${dest_relative}"
    • mkdir -p ${dest_relative}
    • cd ${dest}

Download the tar containing the html tar, the man tar, and the patches tar to the current directory

unpack the individual tars from the bundle

  • tar -xf Docbook_devicetree_160620_0145.tar

unpack the html tar

  • tar -xf docbook_devicetree_html_160620_0145.tgz

determine the URL to use to access the man pages

  • echo "file://${dest}/devicetree.html"

enter the above URL in your favorite browser

installing and using the man command pages

create a location to download and install

  • pick a location, I use 'me/devicetree_docs'
    • dest_relative="me/devicetree_docs"
  • create the location
    • dest="$(pwd)/${dest_relative}"
    • mkdir -p ${dest_relative}
    • cd ${dest}

Download the tar containing the html tar, the man tar, and the patches tar to the current directory

unpack the individual tars from the bundle

  • tar -xf Docbook_devicetree_160620_0145.tar

unpack the man tar

  • tar -xf docbook_devicetree_man_160620_0145.tgz

create the directory tree that the man command expects

  • ln -s devicetree man/man9

use the man command in one of two ways

MANPATH="${dest}/man" man OF_FUNCTION
   eg.
   MANPATH="${dest}/man" man of_node_get


export MANPATH="${dest}/man"
man OF_FUNCTION
  eg
  export MANPATH="${dest}/man"
  man of_node_get
  man of_node_put

installing the source patches and building the docbook results

If you want to compile the docbook results yourself, do the following.

Download the Linux kernel source tree

Download the tar containing the html tar, the man tar, and the patches tar to the current directory

Unpack the individual tars from the bundle

  • tar -xf Docbook_devicetree_160620_0145.tar

Unpack the source patches tar

  • tar -xf docbook_devicetree_patch_160620_0145.tgz

Apply the patches

  • quilt push -a
If you do not have quilt installed, you can instead apply each of the
patches in patches/.  Apply the patches in the order listed in
patches/series.

Build the docbook targets

  • mkdir ../build
  • export KBUILD_OUTPUT=../build
  • make DOCBOOKS="devicetree.xml" mandocs
  • make DOCBOOKS="devicetree.xml" htmldocs

The generated objects will be under the build directory ../build/Documentation/DocBook/

image test

flowers in the desert

This is a photograph from one of my desert trips. If you have arrived early to one of my conference talks, you have probably seen photos from my desert trips.

This spot of color is low in the hills
of Death Valley.


temporary parking spot

Links to pages that are under construction, so that the pages will not get deleted.