Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751943AbdHPPlc (ORCPT ); Wed, 16 Aug 2017 11:41:32 -0400 Received: from mail-yw0-f182.google.com ([209.85.161.182]:33125 "EHLO mail-yw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbdHPPla (ORCPT ); Wed, 16 Aug 2017 11:41:30 -0400 Date: Wed, 16 Aug 2017 11:41:29 -0400 From: Tom Rini To: Rob Herring Cc: Frank Rowand , "devicetree@vger.kernel.org" , Tero Kristo , Nishanth Menon , Tomi Valkeinen , Sekhar Nori , Masahiro Yamada , Michal Marek , Pantelis Antoniou , "linux-kernel@vger.kernel.org" , Linux Kbuild mailing list Subject: Re: [PATCH] devicetree: Enable generation of __symbols__ in all dtb files Message-ID: <20170816154129.GP20467@bill-the-cat> References: <1502831736-28282-1-git-send-email-trini@konsulko.com> <599388D0.9050108@gmail.com> <20170816004238.GH20467@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="al55iTfEjmb7rUKv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3751 Lines: 93 --al55iTfEjmb7rUKv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 16, 2017 at 10:22:03AM -0500, Rob Herring wrote: > On Tue, Aug 15, 2017 at 7:42 PM, Tom Rini wrote: > > On Tue, Aug 15, 2017 at 04:50:40PM -0700, Frank Rowand wrote: > >> On 08/15/17 14:15, Tom Rini wrote: > >> > With support for stacked overlays being part of libfdt it is now > >> > possible and likely that overlays which require __symbols__ will be > >> > applied to the dtb files generated by the kernel. This is done by > >> > passing -@ to dtc. This does increase the filesize (and resident me= mory > >> > usage) based on the number of __symbol__ entries added to match the > >> > contents of the dts. > >> > > >> > Cc: Rob Herring > >> > Cc: Frank Rowand > >> > Cc: Masahiro Yamada > >> > Cc: Michal Marek > >> > Cc: Pantelis Antoniou > >> > Cc: devicetree@vger.kernel.org > >> > Cc: linux-kernel@vger.kernel.org > >> > CC: linux-kbuild@vger.kernel.org > >> > Signed-off-by: Tom Rini > >> > --- > >> > In order for a dtb file to be useful with all types of overlays, it > >> > needs to be generated with the -@ flag passed to dtc so that __symbo= ls__ > >> > are generated. This however is not free, and increases the resulting > >> > dtb file by up to approximately 50% today. In the current worst case > >> > this is moving from 88KiB to 133KiB. In talking with Frank about th= is, > >> > he outlined 3 possible ways (with the 4th option of something else > >> > entirely). > >> > > >> > 1. Make passing -@ to dtc be dependent upon some CONFIG symbol. > >> > 2. In the kernel, if the kernel does not have overlay support, disca= rd > >> > the __symbols__ information that we've been passed. > >> > 3. Have the bootloader pass in, or not, __symbols__ information. > >> > >> I also was hoping that other people might have ideas for additional > >> approaches. > > > > Yes, please. >=20 > A couple of other options come to mind: >=20 > "make DTC_FLAGS=3D'-@' dtbs" should already work. So there's already a > way to build what you want and the kernel is not setting the policy. Not ideal since that drops out the -Wno... flags we pass in. I don't see off-hand why it's not appending to DTC_FLAGS, but that's a fixable problem. > Do like we do for the unittests and make it a per board decision: >=20 > DTC_FLAGS_my-som-board.dtb :=3D -@ >=20 > Then boards that actually need it like SoMs can turn it on. A concern about that of mine is that we'll start to see a 'flood' of patches growing that list at the end of arch/arm/boot/dts/Makefile. --=20 Tom --al55iTfEjmb7rUKv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJZlGepAAoJEIf59jXTHXZSPCYP/iiKyBFAwt8ltQ4C0XL3PBba YLaRPjZwtTjEG9NTn0LMtYQ2Ly0mwpMA2IpYpFYRJI/GtyYZBnt3ZlWohAz7gucw OhQWa6S+XzlUBLINEUHPChBqmdPcWZomkTYM2pAgAdJkBz7osadJGHMdlTJwfSrv l+1GZ64F1Vf2mY8629uv1Ct1BfJ3JqNTAKTcXlLE3+lLMxVz4eX6URNB19EYMp9m Uu58739nLTxkcvIs3mWAiIzrGPdPD4N7X8PCxcBGLVAbeL2TLv5ObPD8iQDJ3jwR JXGdZPCqAc260yt/eVGy7iUZqOSsG7jtkQyghXK71+XDZuAJRmlsOt5PWvSuVVDy pV8IY8U6WwKnWi1l7+L751Zt93arAXyfoe3iyyquiRO7CcwIsWgrK9YqiyYGoc/j 9SduGU5p8q7z/7GrmBSFXLYYHQgThR1GVYzMhO+J7xAx8asMuyD2qsp+MC/R7t/w sSPFsuyHtnD4Vy00Axu1Xz/8XoU4xJXQLv6h+243Qt9Jmhp1eakV7gkoWYkp+Oxu 1ULeQHuzjFTuAmwGoJTvkYP0NiljC9SK6f3sIcmrSBkXn5bLQiX91IxjH2oMNLox L2BNLT7h+wZR1JP/Wa84UtI6P/cSGOS+PfDrpSdQvmDzx+/tKwOE4ok43kVaeyIB DGjSP6bTTIBLrfz2C2Ie =nEIW -----END PGP SIGNATURE----- --al55iTfEjmb7rUKv--