U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 00/19] fdt: Move to the new upstream pylibfdt library
Date: Tue, 18 Apr 2017 12:33:34 -0400	[thread overview]
Message-ID: <20170418163334.GH19487@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ0bfuXGJh69toTaBmurPCCxaPtzqjOwKaUmbVs=B9Mr2A@mail.gmail.com>

On Tue, Apr 18, 2017 at 10:27:37AM -0600, Simon Glass wrote:
> Hi Tom,
> 
> On 18 April 2017 at 10:25, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sun, Apr 16, 2017 at 08:22:14PM -0600, Simon Glass wrote:
> >
> > > Python libfdt bindings have recently been accepted upstream. While the
> > > internals have changed a fair bit most of the API remains the same. Still,
> > > a few functions are different from how they are used in U-Boot so changes
> > > are needed to make this work.
> > >
> > > At present in U-Boot there are two libraries for accessing a device tree
> > > file:
> > >
> > > - FdtNormal which uses U-Boot's own Python bindings
> > > - FdtFallback which uses the fdtget command-line utility
> > >
> > > The latter is not a great solution: it is fairly slow since the DT is
> > > re-read for every access and it cannot provide DT offsets or packing of
> > > the DT.
> > >
> > > In addition, U-Boot now builds the libfdt module if swig is available,
> > > meaning that the fallback module is not used in that case.
> > >
> > > Finally, at some point in the future distributions may start packaging the
> > > libfdt Python module and it will be available without U-Boot needing to
> > > build it itself.
> > >
> > > Therefore it seems like a good idea to take this opportunity to drop the
> > > fallback module and just require that the Python libfdt bindings be
> > > present (at least if need by the build).
> > >
> > > The bindings are needed in two situations:
> > > - When dtoc is used to convert a device tree into C code. This is enabled
> > >     by CONFIG_SPL_OF_PLATDATA
> > > - When binman is used to produce a firmware image. This is used on all x86
> > >     and sunxi boards at present
> > >
> > > This series:
> > > - Plumbs in building the Python libfdt module to the U-Boot build system
> > > - Ensures that the module is always built if needed, print an error if
> > >     swig is not available (and thus the module cannot be built)
> > > - Allows use of a libfdt.py module already installed on the machine
> > > - Drops the FdtFallback support
> > > - Moves fdt.h and libfdt.h into lib/libfdt to aid with syncing with
> > >     upstream, building the Python bindings and to keep the code together
> > > - Merges Fdt and FdtNormal to simplify the code
> > > - Adjusts the Fdt library to work with the new libfdt module
> > > - Adds a few more tests to check access to properties in the DT
> > > - Adjusts binman and dtoc to work with the new approach
> > >
> > > It should be possible to easily sync libfdt's Python bindings with U-Boot
> > > in the future, as development there proceeds.
> >
> > While this came in late, my gut feeling is that it would be best to have
> > this change in the next release (so that various upstreams can get used
> > to the idea of basically always needing python installed to build).
> 
> I'm a little worried that it might cause problems. I made it so that
> it only *requires* python if is it actually needed, though it always
> builds libfdt.py if it can. Or perhaps that is what you are saying,
> that the only way to flush out upstream issues is to apply it?

What I'm saying is that distros (Fedora, openSUSE, OpenEmbedded) are
going to make a blanket change (if they haven't already) to say that
building U-Boot requires python to be installed (since they aren't
likely to try and optimize it on a board-by-board basis when it's "easy"
to just say it's an always dependency).  If you think there's risk with
the change itself, we can wait a release, that's fine too.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170418/98becf3f/attachment.sig>

  reply	other threads:[~2017-04-18 16:33 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17  2:22 [U-Boot] [PATCH 00/19] fdt: Move to the new upstream pylibfdt library Simon Glass
2017-04-17  2:22 ` [U-Boot] [PATCH 01/19] pci: Correct cast for sandbox Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 02/19] fdt: Correct cast for sandbox in fdtdec_setup_memory_size() Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 03/19] fdt: Use SPDX format for licenses in the libfdt headers Simon Glass
2017-04-17 13:05   ` Tom Rini
2017-04-17 13:13     ` Masahiro Yamada
2017-04-17 13:33       ` Tom Rini
2017-04-17 13:47         ` Simon Glass
2017-04-17 14:01           ` Tom Rini
2017-05-02 11:27             ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 04/19] fdt: Move header files into lib/libfdt Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 05/19] fdt: Allow swig options to be provided by Makefile Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 06/19] fdt: Add all source files to the libfdt build Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 07/19] fdt: Rename existing python libfdt module Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 08/19] fdt: Build the new " Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 09/19] fdt: Update fdt_test to use 'dt' instead of 'fdt' Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 10/19] fdt: dtoc: Add a full set of property tests Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 11/19] fdt: Support use of the new python libfdt library Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 12/19] fdt: Makefile: Build python libfdt library if needed Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 13/19] fdt: Stop building the old python libfdt module Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 14/19] fdt: Drop use of the legacy libfdt python module Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 15/19] fdt: Drop fdt_fallback library Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 16/19] binman: Drop a special case related to fdt_fallback Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 17/19] fdt: Merge fdt_normal with its base class Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 18/19] binman: Rename fdt variable to dtb Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 19/19] fdt: Drop fdt_select.py Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-18 16:25 ` [U-Boot] [PATCH 00/19] fdt: Move to the new upstream pylibfdt library Tom Rini
2017-04-18 16:27   ` Simon Glass
2017-04-18 16:33     ` Tom Rini [this message]
2017-04-18 16:48       ` Simon Glass
2017-04-19 14:27         ` Tom Rini
2017-05-02 11:31           ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170418163334.GH19487@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox