From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [ANNOUNCE] sunxi-babelfish (FEX-to-DT translator)
Date: Tue, 7 Jan 2014 23:03:10 +0100 [thread overview]
Message-ID: <20140107220310.GD3103@lukather> (raw)
Hi everyone,
One of the great strength of Allwinner's kernel is that it behaves
pretty much like DT does: their kernel image is mostly generic, and
all the device specific part is stored in a binary file (compiled from
a FEX file), that gets loaded together with the kernel by the
bootloader.
The kernel will then parse that file to get all the informations it
needs (which devices are enabled, which pins are muxed to what
function, etc.). Sounds familiar?
FEX and DT however are not compatible at all, so one board out there
might not have any support in mainline, while it already passes the
hardware description to the kernel.
Hence why I started to work on sunxi-babelfish. It aims at being a
very thin wrapper around the kernel image, that would generate an
uImage, with the babelfish code itself, plus the compiled DTSI we have
for the targetted SoCs, and finally the kernel image. During bootup,
babelfish will take one of these DTBs, and complete it using the
informations fetched from the compiled FEX file the board is feeding
it, before finally passing the DTB to Linux that will continue its
usual boot.
I've been working on this for a week, but we already have all the
pieces of infrastructure needed, plus some basic support for the
devices themselves. Currently, babelfish will only care about the
ATAGS and the UARTs, but I expect the list of devices it's aware of to
grow quite quickly.
The code is stored here:
https://github.com/mripard/sunxi-babelfish/
There's a lot of room for improvements, so patches are welcome :)
Once downloaded, you can compile it using:
CROSS_COMPILE=arm-linux- ZIMAGE=kernel/arch/arm/boot/zImage make uImage
It will obviously generate a uImage, that you will be able to boot
from u-boot.
This has been tested on the A20-olinuxino, so there might be some
glitches on the other SoCs, but I don't really expect any at the
moment, since stuff are pretty generic for now.
Another nice thing about it is that a FEX-to-DT compiler comes at no
cost afterwards. Since dtc is able to generate a DTS from
/proc/device-tree, you can easily generate a DTS for your previously
non-supported board using
dtc -I fs -O dts -o my-board.dts /proc/device-tree/
Anyway, enough talking. Any feedback is, as usual, appreciated.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140107/46139cde/attachment.sig>
next reply other threads:[~2014-01-07 22:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 22:03 Maxime Ripard [this message]
2014-01-08 13:02 ` [ANNOUNCE] sunxi-babelfish (FEX-to-DT translator) Arnd Bergmann
2014-01-08 18:58 ` Maxime Ripard
2014-01-08 19:07 ` Arnd Bergmann
2014-01-08 16:55 ` [linux-sunxi] " Ian Campbell
2014-01-08 18:29 ` Maxime Ripard
2014-01-08 21:24 ` Ian Campbell
2014-01-09 0:15 ` Julian Calaby
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=20140107220310.GD3103@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).