From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frank Rowand Date: Mon, 10 Apr 2017 13:44:04 -0700 Subject: [U-Boot] DT overlay issues - dtc flags In-Reply-To: <1264bdc3-e61e-0256-0a0f-fdd8dbf50397@suse.de> References: <1264bdc3-e61e-0256-0a0f-fdd8dbf50397@suse.de> Message-ID: <58EBEE94.2080803@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de adding cc to myself so I will see replies. On 04/10/17 09:16, Andreas F=C3=A4rber wrote: > Hi, >=20 > I've tried to play around with Device Tree overlays (.dtbo files): >=20 > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/D= ocumentation/devicetree/overlay-notes.txt >=20 > First of all, that document refers to a non-existing > Documentation/devicetree/dt-object-internal.txt. Could someone please > fix that one way or another? >=20 > In my particular example I've tried to extend the &i2c1 and &gpio nodes > of 4.11-rc5 arm64 broadcom/bcm2837-rpi-3-b.dts. The above documentation > prominently claims that this can be done via target =3D <&foo> syntax, but > U-Boot's fdt apply command fails for such a file. If instead I use the > alternative target-path =3D "/soc/..." then it works just fine. >=20 > As mentioned in the very bottom of the documentation, resolution of > phandle target references requires a __symbols__ node in the base .dtb. > IIUC this is only generated when passing the -@ dtc command line flag. >=20 > At first I thought this were an issue with how we build the .dtb files > in openSUSE [1], but by my reading of the kernel Makefiles not passing > -@ in DTC_FLAGS or cmd_dtc, you should run into the exact same issue. >=20 > I could think of a few ARMv7-M systems where such DT bloat might be > undesired (small flash sector sizes), but then it would seem easier to > suppress -@ where needed than to have a feature that by all practical > means is half unusable by default. >=20 > U-Boot itself appears to face a similar issue in that its internal > Device Trees are built without -@, and via Alex' distro boot extensions > this internal DT is passed on via UEFI as fallback when no external .dtb > file is found. So in the non-SPL case the DT should probably be built > with -@, too. >=20 > Or am I misunderstanding something here? >=20 > Thanks, > Andreas >=20 > [1] > https://build.opensuse.org/package/view_file/Kernel:HEAD/dtb-aarch64/dtb-= aarch64.spec?expand=3D1 >=20