Skip to contentSkip to conversation

Include kernel's dtsi from customised dts in buiuldroot-external

Buildroot Bruno Kremel 2 participants 3 messages Aug 21, 2017 – Aug 22, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello All,

I have set up buildroot external for Toradex Colibri iMX6 board. I would
like to customise kernel default dts, so I have made a copy of this dts
to my external board/toradex/colibiri-imx6 and then in the defconfig I
set up the path to custom dts:
BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL)/board/toradex/colibri-imx6/imx6dl-colibri-mcp-25.dts"

This successfully makes buildroot use my modified dts file. But this file inludes some kernel dtsi files.
Namely:
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h> #include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"

These are however not found by dts compiler during build and I end up with dtc failing on undefined symbols in devicetree.

How can I specify dts include path such that it will use kernel dtsi files or what is the correct way to include these from external?

Thanks
Bruno

#2 lore raw

Hi Bruno,

Quoted 15 lines · Bruno Kremel

I have set up buildroot external for Toradex Colibri iMX6 board. I would
like to customise kernel default dts, so I have made a copy of this dts
to my external board/toradex/colibiri-imx6 and then in the defconfig I
set up the path to custom dts:
BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL)/board/toradex/colibri-imx6/imx6dl-colibri-mcp-25.dts"

This successfully makes buildroot use my modified dts file. But this file inludes some kernel dtsi files.
Namely:
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h> #include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"

Quoted 2 lines

These are however not found by dts compiler during build and I end up with dtc failing on undefined symbols in devicetree.

So the pre-processor find the include files, but some symbols are missing. Is that correct?

Quoted 2 lines

How can I specify dts include path such that it will use kernel dtsi files or what is the correct way to include these from external?

The LINUX_BUILD_CMDS macro should copy your custom dts to arch/arm/boot/dts, which is where the .dtsi files should be located. Can you verify that?

What errors do you see?

Does the kernel you took your base dts file from match the kernel you build?

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

Hi Baruch,

Quoted 21 lines · Baruch Siach

Hi Bruno,

Quoted 15 lines · Bruno Kremel

I have set up buildroot external for Toradex Colibri iMX6 board. I would
like to customise kernel default dts, so I have made a copy of this dts
to my external board/toradex/colibiri-imx6 and then in the defconfig I
set up the path to custom dts:
BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL)/board/toradex/colibri-imx6/imx6dl-colibri-mcp-25.dts"

This successfully makes buildroot use my modified dts file. But this file inludes some kernel dtsi files.
Namely:
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h> #include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"

Quoted 2 lines

These are however not found by dts compiler during build and I end up with dtc failing on undefined symbols in devicetree.

Quoted 8 lines

So the pre-processor find the include files, but some symbols are missing. Is that correct?

Quoted 2 lines

How can I specify dts include path such that it will use kernel dtsi files or what is the correct way to include these from external?

The LINUX_BUILD_CMDS macro should copy your custom dts to arch/arm/boot/dts, which is where the .dtsi files should be located. Can you verify that?

This helps a lot. I was suspicious about file not being copied. I just did a copy of vanilla dts from kernel over my modified one and now it works.

So it is indeed error in my dts (don't know exactly where, but at least I know that it's not the include)

Anyway for anybody having the same problem it was these kind of errors:
Error: arch/arm/boot/dts/imx6dl-colibri-mcp-25.dts:113.1-12 Label or path hdmi_audio not found (more of those)

Quoted 6 lines

What errors do you see?

Does the kernel you took your base dts file from match the kernel you build?

baruch

Thanks a lot.