GRUB port for ARMv7-A U-Boot
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Leif Lindholm
I have created a port of GRUB to the ARMv7-A architecture, running on top of the
U-Boot firmware. The "U-Boot API", created by Rafal Jaworowsky <[email protected]>, provides the hardware abstraction layer. Console is supported on serial port using the termios subsystem.
Quoted 9 lines
This port supports, and indeed relies on, flattened device trees (FDT) - passed on from firmware, or loaded from a filesystem. My implementation uses libfdt rather than trying to recycle the existing openfirmware code, and if possible I would like to keep it that way, and have libfdt included in GRUB.
libfdt is dual-licensed, GPLv2+/BSD, and the copyright belongs to David Gibson <[email protected]>. 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.
Quoted 7 lines
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?
Quoted 3 lines
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.
Quoted 2 lines
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?
Quoted 16 lines
Do you have any opinions about how I should treat
the third-party software when I do this?Regards,
Leif
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 7 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 3 lines · Leif Lindholm
libfdt is dual-licensed, GPLv2+/BSD, and the copyright belongs to David Gibson <[email protected]>. 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.
Quoted 9 lines
Quoted 7 lines
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...
Quoted 4 lines
Quoted 2 lines
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.
Quoted 4 lines
Quoted 2 lines
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