grub-devel
[Top][All Lists]
Advanced

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

[RFCv2] GRUB port for ARMv7-A U-Boot


From: Leif Lindholm
Subject: [RFCv2] GRUB port for ARMv7-A U-Boot
Date: Tue, 20 Nov 2012 18:19:31 -0000

This is an updated patch for enabling support for running under ARMv7-A
U-Boot, based on some of Colin's feedback during UDS.

This is somewhat better tested from a usage-standpoint, having added
necessary support to commands like grub-install.

The version contained in this patch is also available as revision 4613 from
lp:~leif-lindholm/linaro-grub/arm-uboot.
Basic build and usage documentation is being kept at
https://wiki.linaro.org/LEG/Kernel/GRUB


Third-party code
----------------
I have rewritten the U-Boot glue layer in as much of a clean-room way
as can be done with a fairly trivial piece of code that you've already read
through a lot. This also gets rid of the special crc32 code.
The api_public.h header (GPLv2+, (c) Rafal Jaworowski) is still included.

The standalone "libgcc" helper implementation remains - there is no safe
workaround for the __clear_cache() issue, and requiring a parallel embedded
toolchain specifically for building GRUB does not make sense.
Nevertheless, all of the included code is (c) FSF.

libfdt (see below).


FDT
---
I did look into reusing the openfirmware code for device-tree handling,
but found no actual handling code in there. All actual scanning and
manipulation is performed through callbacks into openfirmware (using
IEEE1275_CALL_ENTRY_FN()).
So now I have tried instead to import libfdt the way gcrypt and Unicode is
imported. It generates a grub-core/Makefile.libfdt.def exporting a library
which is for now used only by the Linux loader.


Other
-----
The hack of calling uboot-mkimage from within grub-mkimage is now gone -
this is done more correctly by grub-install instead.

grub-install uses the UUID "trick" to make Grub find its modules now,
alleviating the need for special U-Boot environment variables.


Limitations
-----------
- Dynamic linker implemented only for ARMv7-A Thumb instruction set.
- Currently runs uncached, with MMU off.
- No support for ATAG parsing or rewriting, only supports device tree
   as a means of passing information to the Linux kernel. (If an ATAG
   list is passed from U-Boot, it can be passed on unmodified, but the
   "linux" command will not pass on command line parameters.)
- Currently a statically linked kernel, requires RAM at 0x08000000.
- No write support for block devices. Not provided by U-Boot.


Missing
-------
Still, the testbench support and qemu configurations for grub-shell and its
dependents.
grub-mkrescue


Potential future developments
-----------------------------
- Implement networking support.
- Make GRUB kernel a fully relocateable ELF.
- Implement chainloader.
- Enable caches/MMU.


Comments welcome.

Attachment: armv7-uboot-v2.patch
Description: Binary data


reply via email to

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