Skip to content

Instructions for compiling device trees never worked #3844

Open
@ali1234

Description

@ali1234

https://www.raspberrypi.com/documentation/computers/configuration.html#device-trees-overlays-and-parameters

To reproduce:

  1. Make a fresh install of Raspberry Pi OS Lite 64 bit
  2. sudo apt install git bc bison flex libssl-dev make device-tree-compiler
  3. git clone --depth 1 https://github.com/raspberrypi/linux
  4. cd linux/arch/arm/boot/dts/overlays
  5. dtc -@ -Hepapr -I dts -O dtb -o vc4-kms-v3d-pi5.dtbo vc4-kms-v3d-pi5-overlay.dts

Result:

Error: vc4-kms-v3d-pi5-overlay.dts:3.1-2 syntax error
FATAL ERROR: Unable to parse input tree

Now try the version of dtc built by the kernel itself:

  1. cd ~/linux
  2. KERNEL=kernel_2712
  3. make bcm2712_defconfig
  4. make dtbs
  5. scripts/dtc/dtc -@ -Hepapr -I dts -O dtbo -o vc4-kms-v3d-pi5.dtbo arch/arm/boot/dts/overlays/vc4-kms-v3d-pi5-overlay.dts

Result:

Error: arch/arm/boot/dts/overlays/vc4-kms-v3d-pi5-overlay.dts:3.1-2 syntax error
FATAL ERROR: Unable to parse input tree

The specific part of the documentation that I find problematic:

If dtc returns an error about the third line, it doesn’t have the extensions required for overlay work. Run sudo apt install device-tree-compiler and try again - this time, compilation should complete successfully. Note that a suitable compiler is also available in the kernel tree as scripts/dtc/dtc, built when the dtbs make target is used:

It does appear to be complaining about the third line. But the version built by the kernel does exactly the same thing. It would be useful to have the actual error message in the docs here, so that I know if that's the problem I am facing.

PS running make dtbs did build vc4-kms-v3d-pi5.dtbo so it must be possible somehow.

PPS I'm trying to build that specific overlay because I need composite and HDMI to work at the same time, and I know that is possible because when you enable composite and boot with HDMI connected, the HDMI output is left switched on and displaying the last framebuffer it was sent. It just doesn't appear as an output in kms.

Metadata

Metadata

Labels

backlogWe'll be getting to it eventually

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions