grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRUB port for ARMv7-A U-Boot


From: Leif Lindholm
Subject: Re: GRUB port for ARMv7-A U-Boot
Date: Mon, 22 Oct 2012 12:16:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0

On 10/19/12 20:11, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
On 19.10.2012 20:47, Leif Lindholm wrote:
libfdt is dual-licensed, GPLv2+/BSD, and the copyright belongs to David
Gibson <address@hidden>. I have a patch against the libfdt included in
http://jdl.com/software/dtc-v1.3.0.tgz that makes it build under GRUB.

I'd prefer rather without libfdt and share more code with openfirmware
since it's similar brain damage.

I would agree, but the current openfirmware code is very
openfirmware-specific, and the devicetree code is not separated from the rest.

If they should be shared, would it not make sense to use libfdt for both?
Openfirmware code would likely need to change anyway, and it would look a bit
confusing to insert calls to grub_ieee1275_finddevice() in the U-Boot code.

The U-Boot API is released under GPLv2+ consists of 3 source files. They
 are licensed under GPLv2+. The port also contains a crc32 checker I
included from the FreeBSD loader, copyright Gary S. Brown with the
statement that "You may use this program, or code or tables extracted
from it, as desired without restriction.". The crc32 checker is not
strictly speaking required, so could be removed if this poses any
problems.

GRUB already has crc32 from libgcrypt. Could you use it?

I think that is available only as a module? And this is called effectively as
the first thing in grub_machine_init().

I could simply leave it out for now...

In addition to this, the port includes libgcc helper functions (aeabi_*)
taken from linux/arch/arm/lib, licensed under GPLv2+.

These should be included at compile time from system libgcc.

Unfortunately, there is a snag with that; arm libgcc also provides the
__clear_cache function (for cleaning and synchronizing instruction and data
caches). Calls to this function are generated by the compiler, for
trampolines, when it encounters nested functions. However, unless building
with a "bare-metal" cross-compiler, your libgcc implementation will contain a
system call for performing this privileged operation.

U-Boot has a similar thing in place with CONFIG_PRIVATE_LIBGCC.

All of the scavenged source files are (c) FSF.

My intent is to set up a public repository on launchpad.net containing
my modifications on Monday.

Could you send the patch here even if it's not finished?

Of course.

I will start with a couple of patches that could probably be included
regardless of the rest, and follow on with one large patch for the ARM-uboot
support, minus libfdt and crc32.

Regards,

Leif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]