From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XN6DI-0000DP-I9 for mharc-grub-devel@gnu.org; Thu, 28 Aug 2014 16:22:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN6DB-0000CW-NO for grub-devel@gnu.org; Thu, 28 Aug 2014 16:22:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN6D7-000815-7u for grub-devel@gnu.org; Thu, 28 Aug 2014 16:22:25 -0400 Received: from [177.91.79.176] (port=45700 helo=beren) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN6D6-000807-6z for grub-devel@gnu.org; Thu, 28 Aug 2014 16:22:21 -0400 Received: from beren (localhost.localdomain [127.0.0.1]) by beren (8.14.7/8.14.7) with ESMTP id s7SJvDDx004132; Thu, 28 Aug 2014 16:57:14 -0300 Received: (from pfsmorigo@localhost) by beren (8.14.7/8.14.7/Submit) id s7SJvC4O003336; Thu, 28 Aug 2014 16:57:12 -0300 From: Paulo Flabiano Smorigo To: grub-devel@gnu.org Subject: [RFC PATCH 0/3] grub powerpc64 little-endian enablement Date: Thu, 28 Aug 2014 16:56:02 -0300 Message-Id: <1409255765-3209-1-git-send-email-pfsmorigo@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 177.91.79.176 Cc: Paulo Flabiano Smorigo X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2014 20:22:30 -0000 From: Paulo Flabiano Smorigo 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 -- 1.8.1.4