Devuan bug report logs - #311
Device Tree Overlays Do Not Work

Package: arm64_raspi3; Reported by: Paul Bryan Roberts <paul.bryan.roberts@the-custards.uk>; dated Tue, 26 Mar 2019 14:18:02 UTC; Maintainer for arm64_raspi3 is (unknown).


Message received at submit@bugs.devuan.org:


Received: (at submit) by bugs.devuan.org; 26 Mar 2019 14:10:02 +0000
To: submit@bugs.devuan.org
From: Paul Bryan Roberts <paul.bryan.roberts@the-custards.uk>
Subject: Device Tree Overlays Do Not Work
Date: Tue, 26 Mar 2019 14:03:40 +0000

This is a multi-part message in MIME format.
--------------23EF5785766A25ECA034CE5B
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Package: arm64_raspi3
Version: ascii_2.0.0

  * Details of the configuration of the program with the problem.
    Include the complete text of its configuration files.

I was using devuan_ascii_2.0.0_arm64_raspi3.img.xz downloaded on January 
19th 2019 at around 18:00 UTC.

  * A description of the incorrect behaviour: exactly what behaviour you
    were expecting, and what you observed. A transcript of an example
    session is a good way of showing this.

This image comes with a /boot/overlays directory containing a large 
number Device Tree Overlay files and a /boot/config.txt that contain at 
least one dtoverlay= directive.

So it seems reasonable to suppose that this Devuan image is supposed to 
be Device Tree Overlay capable.  It appears not to be.

  * The /exact/ and /complete/ text of any error messages printed or
    logged. This is very important!

It appears DT overlays are not loaded.  There are no error messages 
printed or logged:  such failures are silent.

There is a tool named vcdbg that can be used to extract the Device Tree 
load time logs but this is closed source and, as yet, there is no arm64 
binary.  I did get the following using a different tool:

pi@devuan:~$ dtmerge /boot/bcm2710-rpi-3-b-plus.dtb merge.dtbo 
/boot/overlays/tft35a.dtbo
DTOVERLAY[error]: No symbols found
* Exiting with error code 1

Without symbols you can't overlay.  Sadly the tool dtmerge is not 
available for Devuan.  You can build it from source or pinch an arm64 
binary from the Ubuntu ubuntu-raspi2 PPA.

  * Exactly what you typed or did to demonstrate the problem.

What you can do under Devuan is confirm that Device Tree Blob is missing 
symbols.  Install the device-tree-compiler-package first.

pi@devuan:~$ fdtdump /boot/overlays/tft35a.dtbo | fgrep '__ {'
         __overlay__ {
         __overlay__ {
         __overlay__ {
     __overrides__ {
     __symbols__ {
     __fixups__ {
     __local_fixups__ {
pi@devuan:~$ fdtdump /boot/bcm2710-rpi-3-b-plus.dtb | fgrep '__ {'
     __overrides__{

This confirms that the symbols are missing from the Devuan DT Blob, not 
my DT Overlay.

  * A description of the incorrect behaviour: exactly what behaviour you
    were expecting, and what you observed. A transcript of an example
    session is a good way of showing this.

The DT Overlay describes my device.  When applied, the kernel will load 
the appropriate modules (ads7846 and fb_ili9486).  The modules should 
appear in the dmesg output and also the output of lsmod.

Under Devuan, they do not.  The current versions of these modules do not 
take parameters but expect to extract them from the Device Tree so 
manual loading of these has no effect.

My device is unusable.

  * A suggested fix, or even a patch, if you have one.

A quick work around is to take the equivalent Device Tree Blob from 
Raspian.  It contains symbols, the kernel loads the modules, the device 
springs into life and everyone lives happily ever after.

A more sensible approach might be to upgrade the device tree compiler to 
a version that is symbol capable, build the Device Tree Blobs passing 
the -@ option to the device tree compiler and reissue the SD image(s).



--------------23EF5785766A25ECA034CE5B
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <pre>Package: arm64_raspi3
Version: ascii_2.0.0
</pre>
    <ul>
      <li>Details of the configuration of the program with the problem.
        Include the complete text of its configuration files.
      </li>
    </ul>
    <p>I was using devuan_ascii_2.0.0_arm64_raspi3.img.xz downloaded on
      January 19th 2019 at around 18:00 UTC.<br>
    </p>
    <ul>
      <li>A description of the incorrect behaviour: exactly what
        behaviour you were expecting, and what you observed. A
        transcript of an example session is a good way of showing this.
      </li>
    </ul>
    <p>This image comes with a /boot/overlays directory containing a
      large number Device Tree Overlay files and a /boot/config.txt that
      contain at least one dtoverlay= directive.</p>
    <p>So it seems reasonable to suppose that this Devuan image is
      supposed to be Device Tree Overlay capable.  It appears not to be.<br>
    </p>
    <ul>
      <li>The <em>exact</em> and <em>complete</em> text of any error
        messages printed or logged. This is very important! </li>
    </ul>
    <p>It appears DT overlays are not loaded.  There are no error
      messages printed or logged:  such failures are silent.</p>
    <p>There is a tool named vcdbg that can be used to extract the
      Device Tree load time logs but this is closed source and, as yet,
      there is no arm64 binary.  I did get the following using a
      different tool:</p>
    <p>pi@devuan:~$ dtmerge /boot/bcm2710-rpi-3-b-plus.dtb merge.dtbo
      /boot/overlays/tft35a.dtbo <br>
      DTOVERLAY[error]: No symbols found<br>
      * Exiting with error code 1<br>
    </p>
    <p>Without symbols you can't overlay.  Sadly the tool dtmerge is not
      available for Devuan.  You can build it from source or pinch an
      arm64 binary from the Ubuntu ubuntu-raspi2 PPA.</p>
    <ul>
      <li>Exactly what you typed or did to demonstrate the problem. </li>
    </ul>
    <p>What you can do under Devuan is confirm that Device Tree Blob is
      missing symbols.  Install the device-tree-compiler-package first.</p>
    <p>pi@devuan:~$ fdtdump /boot/overlays/tft35a.dtbo | fgrep '__ {'<br>
              __overlay__ {<br>
              __overlay__ {<br>
              __overlay__ {<br>
          __overrides__ {<br>
          __symbols__ {<br>
          __fixups__ {<br>
          __local_fixups__ {<br>
      pi@devuan:~$ fdtdump /boot/bcm2710-rpi-3-b-plus.dtb | fgrep '__ {'<br>
          __overrides__{</p>
    <p>This confirms that the symbols are missing from the Devuan DT
      Blob, not my DT Overlay.<br>
    </p>
    <ul>
      <li>A description of the incorrect behaviour: exactly what
        behaviour you were expecting, and what you observed. A
        transcript of an example session is a good way of showing this.
      </li>
    </ul>
    <p>The DT Overlay describes my device.  When applied, the kernel
      will load the appropriate modules (ads7846 and fb_ili9486).  The
      modules should appear in the dmesg output and also the output of
      lsmod.</p>
    <p>Under Devuan, they do not.  The current versions of these modules
      do not take parameters but expect to extract them from the Device
      Tree so manual loading of these has no effect.</p>
    <p>My device is unusable.<br>
    </p>
    <ul>
      <li>A suggested fix, or even a patch, if you have one. </li>
    </ul>
    <p>A quick work around is to take the equivalent Device Tree Blob
      from Raspian.  It contains symbols, the kernel loads the modules,
      the device springs into life and everyone lives happily ever
      after.</p>
    <p>A more sensible approach might be to upgrade the device tree
      compiler to a version that is symbol capable, build the Device
      Tree Blobs passing the -@ option to the device tree compiler and
      reissue the SD image(s).</p>
    <p><br>
    </p>
  </body>
</html>

--------------23EF5785766A25ECA034CE5B--


Acknowledgement sent to Paul Bryan Roberts <paul.bryan.roberts@the-custards.uk>:
New bug report received and forwarded. Copy sent to owner@bugs.devuan.org. Full text available.


Report forwarded to devuan-bugs@lists.dyne.org, owner@bugs.devuan.org:
bug#311; Package arm64_raspi3. Full text available.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Tue, 18 Jun 2019 06:39:01 UTC