Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
From 5b8288257c66c76cc578935276dc5b512010b6a3 Mon Sep 17 00:00:00 2001
|
||||
From: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Date: Wed, 21 Aug 2024 07:23:19 +0200
|
||||
Subject: [PATCH] riscv64: handle R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128
|
||||
|
||||
For C++ applications or libraries like gdbserver or gmp
|
||||
we need to handle these relocations.
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Upstream: https://github.com/uclinux-dev/elf2flt/pull/35
|
||||
---
|
||||
elf2flt.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/elf2flt.c b/elf2flt.c
|
||||
index 04b6b43..d5e32ab 100644
|
||||
--- a/elf2flt.c
|
||||
+++ b/elf2flt.c
|
||||
@@ -840,6 +840,8 @@ output_relocs (
|
||||
case R_RISCV_SET8:
|
||||
case R_RISCV_SET16:
|
||||
case R_RISCV_SET32:
|
||||
+ case R_RISCV_SET_ULEB128:
|
||||
+ case R_RISCV_SUB_ULEB128:
|
||||
continue;
|
||||
case R_RISCV_32:
|
||||
case R_RISCV_64:
|
||||
--
|
||||
2.30.2
|
||||
|
||||
3
package/elf2flt/elf2flt.hash
Normal file
3
package/elf2flt/elf2flt.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 9fd899d0c66552ecb175ff6764e5af810aa1bb78db38a64768a1b97c3c62199d elf2flt-2024.05.tar.gz
|
||||
sha256 f20bc5007904094e3a4e9fbcc3526cdd40893f91d458c3139b308e5c4c0899c6 LICENSE.TXT
|
||||
52
package/elf2flt/elf2flt.mk
Normal file
52
package/elf2flt/elf2flt.mk
Normal file
@@ -0,0 +1,52 @@
|
||||
################################################################################
|
||||
#
|
||||
# elf2flt
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ELF2FLT_VERSION = 2024.05
|
||||
ELF2FLT_SITE = $(call github,uclinux-dev,elf2flt,v$(ELF2FLT_VERSION))
|
||||
ELF2FLT_LICENSE = GPL-2.0+
|
||||
ELF2FLT_LICENSE_FILES = LICENSE.TXT
|
||||
|
||||
HOST_ELF2FLT_DEPENDENCIES = host-binutils host-zlib
|
||||
|
||||
# 0001-elf2flt-handle-binutils-2.34.patch
|
||||
HOST_ELF2FLT_AUTORECONF = YES
|
||||
|
||||
# elf2flt needs to link against libbfd.a and libiberty.a which are
|
||||
# provided by host-binutils, but not installed, so we poke directly
|
||||
# into the host-binutils build directory.
|
||||
HOST_ELF2FLT_LIBBFD_PATH = $(HOST_BINUTILS_DIR)/bfd/.libs/libbfd.a
|
||||
|
||||
# It is not exactly a host variant, but more a cross variant, which is
|
||||
# why we pass a special --target option.
|
||||
HOST_ELF2FLT_CONF_OPTS = \
|
||||
--with-bfd-include-dir=$(HOST_BINUTILS_DIR)/bfd/ \
|
||||
--with-binutils-include-dir=$(HOST_BINUTILS_DIR)/include/ \
|
||||
--with-libbfd=$(HOST_ELF2FLT_LIBBFD_PATH) \
|
||||
--with-libiberty=$(HOST_BINUTILS_DIR)/libiberty/libiberty.a \
|
||||
--target=$(GNU_TARGET_NAME) \
|
||||
--disable-werror
|
||||
|
||||
HOST_ELF2FLT_LIBS = -lz -ldl
|
||||
|
||||
HOST_ELF2FLT_CONF_ENV = LIBS="$(HOST_ELF2FLT_LIBS)"
|
||||
|
||||
# Hardlinks between binaries in different directories cause a problem
|
||||
# with rpath fixup, so we de-hardlink those binaries, and replace them
|
||||
# with copies instead. Note that elf2flt will rename ld to ld.real
|
||||
# before installing its own ld, but we already took care of the
|
||||
# original ld from binutils so that it is already de-hardlinked. So
|
||||
# ld is now the one from elf2flt, and we want to de-hardlinke it.
|
||||
ELF2FLT_TOOLS = elf2flt flthdr ld
|
||||
define HOST_ELF2FLT_FIXUP_HARDLINKS
|
||||
$(foreach tool,$(ELF2FLT_TOOLS),\
|
||||
rm -f $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool) && \
|
||||
cp -a $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-$(tool) \
|
||||
$(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool)
|
||||
)
|
||||
endef
|
||||
HOST_ELF2FLT_POST_INSTALL_HOOKS += HOST_ELF2FLT_FIXUP_HARDLINKS
|
||||
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user