[Skiboot] [PATCH v1 2/2] Build skiboot little-endian by default

Nicholas Piggin npiggin at gmail.com
Sat Aug 7 14:13:47 AEST 2021


LE is the way to go. Significantly smaller, less stack, faster, and
with later OPAL calling convention changes, it can avoid endian flips
when called from an LE OS, and there are other new features in the
pipeline that may initially only be implemented for LE OS and LE
skiboot.

This reduces skiboot.lid.xz size by 10KiB.

Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 Makefile | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index d236df9ec..6e5b91d84 100644
--- a/Makefile
+++ b/Makefile
@@ -48,12 +48,18 @@ KERNEL ?=
 #
 STACK_CHECK ?= $(DEBUG)
 
+BIG_ENDIAN ?= 0
+ifeq ($(BIG_ENDIAN),1)
+LITTLE_ENDIAN = 0
+else
+LITTLE_ENDIAN ?= 1
+endif
+
 #
 # Experimental (unsupported) build options
 #
-# Little-endian does not yet build. Include it here to set ELF ABI.
-LITTLE_ENDIAN ?= 0
-# ELF v2 ABI is more efficient and compact
+# ELF v2 ABI is more efficient and compact.
+# This can be set for big-endian builds. Clearing it for LE probably won't work.
 ELF_ABI_v2 ?= $(LITTLE_ENDIAN)
 # Discard unreferenced code and data at link-time
 DEAD_CODE_ELIMINATION ?= 0
-- 
2.23.0



More information about the Skiboot mailing list