Skip to content

RFC grub powerpc64 little-endian enablement

Paulo Flabiano Smorigo grub-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Add powerpc little-endian (ppc64le) flagsconfigure.ac grub-core/Makefile.am+17 -23 replies
2/3Files reorganization and include some libgcc fuctionsgrub-core/Makefile.core.def grub-core/kern/misc.c grub-core/kern/powerpc/compiler-rt.S +2 more+299 -674 replies
3/3Suport for bi-endianess in elf filegrub-core/kern/elf.c grub-core/kern/elfXX.c+131 -21 reply

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchBrent BaudeVladimir 'phcoder' SerbinenkoTomohiro B Berry
1/3
2/3Also-By Also-By Also-By Also-By
3/3Also-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [RFC PATCH 0/3] grub powerpc64 little-endian enablement

From: Paulo Flabiano Smorigo <[email protected]>

Hi,

At the beginning of the year we provide a patchset that enabled GRUB for little-endian PowerPC. Our approach at the time was to build GRUB itself and its tools in 64-bit little-endian. One of the reasons of build in 64-bit is to avoid 32-bit dependencies in the distro and build a system entirely 64-bit.

This patchset was not welcomed at the time because it would bring a high-maintainance-cost, without real gain since it could just be cross-compiled.

After that, Brent Baude, Vladmir (phcoder) and I started to work in a solution that would cross-compile but without 32-bit dependencies. This patchset is the result of this new approach. It's based on the work of Brent Baude, Vladimir (phcoder), and Tomohiro.

It can be devided in two parts:

1) Skip libgcc dependency just for ppc64el (patch 1 and 2);
2) Check elf endianess and byteswap if necessary (patch 3);

The result is GRUB itself in 32-bit BE and its tools in 64-bit LE. This solution satisfies the needs of the distros. I tested it in three different distros, in both endianess and it's fine.

If thoses patches were accepted we will have an official solution. Nowadays, distros are taking diffrent approachs. Some of then are using the original solutions and others are using cross-compiler.

--
Paulo Flabiano Smorigo
IBM Linux Technology Center

Paulo Flabiano Smorigo (3):
Add powerpc little-endian (ppc64le) flags Files reorganization and include some libgcc fuctions Suport for bi-endianess in elf file

 configure.ac                         |  17 ++++-
 grub-core/Makefile.am                |   2 +
 grub-core/Makefile.core.def          |   1 +
 grub-core/kern/elf.c                 |  60 +++++++++++++++-
 grub-core/kern/elfXX.c               |  73 ++++++++++++++++++++
 grub-core/kern/misc.c                | 107 ++++++++++++++++++++++++++++
 grub-core/kern/powerpc/compiler-rt.S | 130 +++++++++++++++++++++++++++++++++++
 include/grub/compiler.h              |  61 ++++++++++++++++
 include/grub/libgcc.h                |  67 ------------------
 9 files changed, 447 insertions(+), 71 deletions(-)
 create mode 100644 grub-core/kern/powerpc/compiler-rt.S
Signature · 1 line
1.8.1.4