From: Lionel Flandrin <lionel@svkt.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] mkpimage: rewrite to support header version 1
Date: Fri, 27 Jan 2017 10:52:51 +0100 [thread overview]
Message-ID: <20170127095249.d74pnbgc32fhp7do@ed> (raw)
In-Reply-To: <20170127211703.7e7d1113@free-electrons.com>
On Fri, Jan 27, 2017 at 09:17:03PM +1300, Thomas Petazzoni wrote:
> Hello,
>
> On Thu, 26 Jan 2017 12:28:31 +0100, Lionel Flandrin wrote:
> > mkpimage is a proprietary tool part of Altera's Embedded Development
> > Suite which is used to generate the image files supported by their
> > BootROMs.
> >
> > Newer versions of their SoCs (such as the Arria 10) use header version
> > 1 which was not supported by the previous version of this tool.
> >
> > This new version supports header version 1, improves error handling
> > and tweaks the output to bring it closer to Altera's own tool. In
> > particular the padding calculations have been changed. In all the
> > configurations tested this program and Altera's mkpimage produce
> > exactly the same files (while the previous version didn't).
> >
> > Signed-off-by: Lionel Flandrin <lionel@svkt.org>
>
> Why not import the new version of this program available in Barebox,
> which does support V1 headers nowadays?
Because I only noticed that too late... The comment about the barebox
version was in the mk and when I saw it I was almost already done with
my version. My search engine skills failed me once again.
Furthermore this version supports some additional parameters like
setting the alignment and the entry point offset in the header (which
are also supported in Altera's tool). It's also a little more user
friendly (better error reporting etc...). Not a huge deal but still.
More importantly it's closer to Altera's original mkpimage, both in
command line usage and in the resulting image format making it a
better canditate for drop-in replacement. So I decided that it was
worth finishing it.
> Otherwise, where does your version comes from?
It's original work based on the current version of mkpimage.c in the
buildroot repo and my reverse-engineering of version 16.1 of Altera's
closed source java-based mkpimage.
I realize it might make it a bit "off-topic" for inclusion in source
form in buildroot's repo but it's not exactly complicated code either,
it's a simple 14byte header and a 32bit CRC.
I've compared the output of this code with altera's and barebox's
version and they all generate the same binaries with the caveat that
barebox's version uses different alignment constraints and doesn't
handle certain options.
But really it's up to you, for my current use case I can live with
barebox's updated version if you prefer. Alternatively I could try
getting this version of the code in barebox first, even though I don't
use the project myself.
> Best regards,
>
> Thomas
Thank you for taking the time to review this,
--
Lionel Flandrin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170127/ae7fd5f0/attachment.asc>
next prev parent reply other threads:[~2017-01-27 9:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 11:16 [Buildroot] [PATCH 1/3] mkpimage: rewrite to support header version 1 Lionel Flandrin
2017-01-26 11:17 ` [Buildroot] [PATCH 2/3] u-boot: Add support for Altera mkpimage generation Lionel Flandrin
2017-01-26 11:17 ` [Buildroot] [PATCH 3/3] DEVELOPERS: Add Lionel Flandrin to package/mkpimage Lionel Flandrin
2017-01-26 11:25 ` [Buildroot] [PATCH 1/3] mkpimage: rewrite to support header version 1 Lionel Flandrin
2017-01-26 11:28 ` Lionel Flandrin
2017-01-27 8:17 ` Thomas Petazzoni
2017-01-27 9:52 ` Lionel Flandrin [this message]
2017-01-28 8:42 ` Thomas Petazzoni
2017-01-28 11:27 ` Lionel Flandrin
2017-01-30 10:33 ` [Buildroot] [PATCH 1/2] mkpimage: bump to latest barebox version Lionel Flandrin
2017-01-30 10:33 ` [Buildroot] [PATCH 2/2] u-boot: Add support for Altera mkpimage generation Lionel Flandrin
2017-02-09 22:33 ` Thomas Petazzoni
2017-02-10 9:10 ` Lionel Flandrin
2017-02-10 9:30 ` Thomas Petazzoni
2017-02-10 13:21 ` Lionel Flandrin
2017-02-13 13:59 ` [Buildroot] [PATCH 1/2] u-boot: add an option to generate u-boot-dtb.bin Lionel Flandrin
2017-02-13 13:59 ` [Buildroot] [PATCH 2/2] u-boot: add support for full image socfpga mkpimage support Lionel Flandrin
2017-02-13 14:27 ` Thomas Petazzoni
2017-02-13 14:57 ` Lionel Flandrin
2017-02-13 15:20 ` Thomas Petazzoni
2017-02-13 15:33 ` [Buildroot] [PATCH v2 2/2] u-boot: add support for full image socfpga mkpimage Lionel Flandrin
2017-03-05 21:31 ` Thomas Petazzoni
2017-03-05 21:30 ` [Buildroot] [PATCH 1/2] u-boot: add an option to generate u-boot-dtb.bin Thomas Petazzoni
2017-02-09 22:34 ` [Buildroot] [PATCH 1/2] mkpimage: bump to latest barebox version Thomas Petazzoni
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=20170127095249.d74pnbgc32fhp7do@ed \
--to=lionel@svkt.org \
--cc=buildroot@busybox.net \
/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