All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] python3 support for pylibfdt
Date: Fri, 28 Jun 2019 08:51:17 -0400	[thread overview]
Message-ID: <20190628125117.GU9388@bill-the-cat> (raw)
In-Reply-To: <CALeDE9O8zEitAJqPR1agGgEP+t+077Rrk1RbLNeJipPiSy1qkA@mail.gmail.com>

On Fri, Jun 28, 2019 at 01:38:01PM +0100, Peter Robinson wrote:
> > > > > With the EOL of python2 soon I've been looking at the Fedora U-Boot
> > > > > builds to see what it would take to move over to python3. There's a
> > > > > couple of issues building the bundled pylibfdt, the first is the
> > > > > Makefile hard codes python2, the second is that the generated
> > > > > libfdt_wrap.c doesn't seem to find the python3 version of Python.h
> > > > > (errors below).
> > > > >
> > > > > It seems upstream now supports building pylibfdt with dtc 1.5.0 but I
> > > > > couldn't quite work out how this fits into the U-Boot bundled version.
> > > > > Is there plans to be able to support pylibfdt with python3?
> > > >
> > > > Sounds like we need to run the normal kernel script to re-sync with
> > > > upstream?  Thanks!
> > >
> > > Seems reasonable, I'll keep an eye out for a patch series to test,
> > > it's quite straight forward to test from my PoV.
> >
> > It won't be any time soon, sadly.  Updating to the same dtc in the
> > kernel (so just v1.4.7+) causes both massive amount of new device tree
> > warnings as well as several fail to link due to size growth problems.
> 
> I'm guessing the size problem is due to an increase in size of where
> libfdt is linked in and not due to pylibfdt. Would it make sense to
> have a feature branch with the rebase to make it easier to test/fix
> the issues? And rebasing some DT to the current kernel versions should
> fix up a bunch of the DT problems?

The size growth is due to the C side growing, yes.  Some of it is the
safety checking I warned about back at the time and the rest of it is
just general growth (U-Boot is guilty of that all the time, so I can't
really complain about some other project growing slightly).

Rebasing to the current kernel version adds a bunch of DT problems, some
of which I hope would be fixed by re-syncing the base DT at least.

> Fedora, as are many other distros, is actively retiring python2 due to
> it's upcoming EOL ~ 6 months from now. I've had to already rescue a
> couple of python2 packages to keep U-Boot building, there's an
> intention to actively remove python2 in Fedora 32 (scheduled for May
> 2020) which means anything post U-Boot 2019.10 (the version we're
> aiming for in F-31) will start to cause me big problems.
> 
> Maybe we could add this to migration plans like any of the DM subsytems?

So, looking again, the problem is that upstream, pylibfdt/setup.py is
still using python2.  So while a resync with upstream dtc might be good,
it won't solve this issue.  I'm not even sure why it doesn't work with
Python3, other than that in January we added a patch to ensure we used
Python2 and not 3.

Simon, I don't see your series that updated a bunch of stuff to work
with Python 3 in master, but it's listed as Accepted in patchwork, do
you know what happened?  Thanks!

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

  reply	other threads:[~2019-06-28 12:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18  9:39 [U-Boot] python3 support for pylibfdt Peter Robinson
2019-06-19 18:22 ` Tom Rini
2019-06-20 10:45   ` Peter Robinson
2019-06-26 21:32     ` Tom Rini
2019-06-28 12:38       ` Peter Robinson
2019-06-28 12:51         ` Tom Rini [this message]
2019-06-28 13:52           ` Simon Glass
2019-07-24  9:23       ` Peter Robinson
2019-07-24 14:47         ` Simon Glass
2019-08-28 11:46           ` Peter Robinson
2019-08-28 13:44             ` Simon Glass
2019-08-28 13:47               ` Tom Rini
2019-08-28 16:11                 ` Simon Glass
2019-08-29  1:19                   ` Tom Rini
2019-09-04 14:36                     ` Simon Glass
2019-10-25  3: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=20190628125117.GU9388@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.