From: Chris Webb <chris@arachsys.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 0/2] rockchip: make_fit_atf.py Eliminate pyelftools dependency
Date: Tue, 16 Jul 2019 20:51:44 +0100 [thread overview]
Message-ID: <20190716195143.GA10526@arachsys.com> (raw)
Building for rockchip, make_fit_atf.py depends on pyelftools, a non-bundled
python module that is not used elsewhere in building u-boot or the kernel.
We only use pyelftools to pull out PT_LOAD segments. ELF is very simple, so
doing this manually is easy and spares users the extra dependency. In fact,
a straightforward implementation shrinks make_fit_aft.py rather than adding
complexity.
Andy Yan's patch
https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip/commit/619f002db864ef8caa30863bde62df5c651a7312
is a prerequisite for this. The new code does not erroneously count
GNU_STACK sections and therefore without the above patch, the loadables in
the conf section will always be one short, even where GNU_STACK is present.
I have tested this script with python 2 and 3 against all bl31 elf files at
https://github.com/rockchip-linux/rkbin/tree/master/bin/rk33
as well as an rk3399 bl31.elf built locally from the master branch of
https://github.com/ARM-software/arm-trusted-firmware
to which my toolchain added the extra GNU_STACK segment.
In each case, identical *.bin files were produced compared to the pyelftools
implementation, and a correct .its configuration (without off-by-one error)
was emitted, with and without dtbs supplied to the script.
Changes in v2:
- no exception on a valid but completely empty bl31 ELF file
- restrict documentation updates to the Rockchip docs (!)
Changes in v3:
- code style: add correct whitespace around multiply operator
next reply other threads:[~2019-07-16 19:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 19:51 Chris Webb [this message]
2019-07-16 19:52 ` [U-Boot] [PATCH v3 1/2] rockchip: make_fit_atf.py: Eliminate pyelftools dependency Chris Webb
2019-07-17 1:08 ` Andy Yan
2019-07-17 10:47 ` Kever Yang
2019-07-23 8:04 ` [U-Boot] [PATCH v3 1/2] rockchip: make_fit_atf.py: Eliminate pyelftools dependency【请注意,邮件由u-boot-bounces@lists.denx.de代发】 Kever Yang
2019-07-16 19:53 ` [U-Boot] [PATCH v3 2/2] rockchip: Remove obsolete references to pyelftools Chris Webb
2019-07-17 10:39 ` Kever Yang
2019-07-23 8:04 ` [U-Boot] [PATCH v3 2/2] rockchip: Remove obsolete references to pyelftools【请注意,邮件由u-boot-bounces@lists.denx.de代发】 pyelftools Kever Yang
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=20190716195143.GA10526@arachsys.com \
--to=chris@arachsys.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.