Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From de58cbe979942308eb8823a526cd68b06d5dc662 Mon Sep 17 00:00:00 2001
|
||||
From: Sacha <sachahony@gmail.com>
|
||||
Date: Wed, 13 Mar 2024 13:28:41 +0100
|
||||
Subject: [PATCH] Change libs order to avoid picking up system libei
|
||||
|
||||
Upstream: https://github.com/erlang/otp/commit/de58cbe
|
||||
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
|
||||
---
|
||||
lib/odbc/c_src/Makefile.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
|
||||
index d1b26743a6a4..03ed314f6a26 100644
|
||||
--- a/lib/odbc/c_src/Makefile.in
|
||||
+++ b/lib/odbc/c_src/Makefile.in
|
||||
@@ -80,10 +80,10 @@ ODBC_INCLUDE = @ODBC_INCLUDE@
|
||||
# ----------------------------------------------------
|
||||
CC = @CC@
|
||||
CFLAGS = $(TYPEFLAGS) @CFLAGS@ @THR_DEFS@ @DEFS@
|
||||
-EI_LDFLAGS = -L$(EI_ROOT)/obj$(TYPEMARKER)/$(TARGET)
|
||||
+EI_LDFLAGS = -L$(EI_ROOT)/obj$(TYPEMARKER)/$(TARGET) $(EI_LIB)
|
||||
LD = @LD@
|
||||
-LDFLAGS = $(ODBC_LIB) $(EI_LDFLAGS)
|
||||
-LIBS = @LIBS@ @THR_LIBS@ $(EI_LIB)
|
||||
+LDFLAGS = $(EI_LDFLAGS) $(ODBC_LIB)
|
||||
+LIBS = @LIBS@ @THR_LIBS@
|
||||
INCLUDES = -I. $(ODBC_INCLUDE) $(EI_INCLUDE)
|
||||
TARGET_FLAGS = @TARGET_FLAGS@
|
||||
|
||||
--
|
||||
2.55.0
|
||||
|
||||
53
package/erlang/Config.in
Normal file
53
package/erlang/Config.in
Normal file
@@ -0,0 +1,53 @@
|
||||
config BR2_PACKAGE_HOST_ERLANG_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_HOSTARCH = "aarch64"
|
||||
default y if BR2_HOSTARCH = "x86_64"
|
||||
default y if BR2_HOSTARCH = "x86"
|
||||
|
||||
config BR2_PACKAGE_ERLANG_ARCH_SUPPORTS
|
||||
bool
|
||||
# see HOWTO/INSTALL.md for Erlang's supported platforms
|
||||
# when using its native atomic ops implementation or gcc's
|
||||
# __atomic_* builtins
|
||||
default y if BR2_i386 || BR2_x86_64 || BR2_powerpc || \
|
||||
BR2_sparc_v9 || BR2_arm || BR2_aarch64 || BR2_mipsel || \
|
||||
BR2_RISCV_64
|
||||
# erlang needs host-erlang
|
||||
depends on BR2_PACKAGE_HOST_ERLANG_ARCH_SUPPORTS
|
||||
|
||||
comment "erlang needs a glibc or musl toolchain w/ dynamic library, threads, wchar"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_PACKAGE_ERLANG_ARCH_SUPPORTS
|
||||
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS \
|
||||
|| !BR2_USE_WCHAR || BR2_TOOLCHAIN_USES_UCLIBC
|
||||
|
||||
config BR2_PACKAGE_ERLANG
|
||||
bool "erlang"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_TOOLCHAIN_USES_UCLIBC
|
||||
depends on BR2_PACKAGE_ERLANG_ARCH_SUPPORTS
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Erlang is a programming language used to build massively
|
||||
scalable soft real-time systems with requirements on high
|
||||
availability. Some of its uses are in telecoms, banking,
|
||||
e-commerce, computer telephony and instant messaging.
|
||||
Erlang's runtime system has built-in support for
|
||||
concurrency, distribution and fault tolerance.
|
||||
|
||||
http://www.erlang.org
|
||||
|
||||
if BR2_PACKAGE_ERLANG
|
||||
|
||||
config BR2_PACKAGE_ERLANG_MEGACO
|
||||
bool "install megaco application"
|
||||
help
|
||||
The Megaco application is a framework for building
|
||||
applications on top of the Megaco/H.248 protocol. It is
|
||||
approximately 14MB in size so if you do not need it then
|
||||
it is recommended not to enable it.
|
||||
|
||||
endif # BR2_PACKAGE_ERLANG
|
||||
5
package/erlang/erlang.hash
Normal file
5
package/erlang/erlang.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# From https://github.com/erlang/otp/releases/download/OTP-26.2.5.21/SHA256.txt
|
||||
sha256 e1fde86f4e2874d4c136221a34753b5b785d762b910fb3fb35a23a6a7faf0a64 otp_src_26.2.5.21.tar.gz
|
||||
|
||||
# Hash for license file
|
||||
sha256 809fa1ed21450f59827d1e9aec720bbc4b687434fa22283c6cb5dd82a47ab9c0 LICENSE.txt
|
||||
113
package/erlang/erlang.mk
vendored
Normal file
113
package/erlang/erlang.mk
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
################################################################################
|
||||
#
|
||||
# erlang
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ERLANG_VERSION = 26.2.5.21
|
||||
ERLANG_RELEASE = $(firstword $(subst ., ,$(ERLANG_VERSION)))
|
||||
ERLANG_SITE = \
|
||||
https://github.com/erlang/otp/releases/download/OTP-$(ERLANG_VERSION)
|
||||
ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz
|
||||
ERLANG_DEPENDENCIES = host-erlang
|
||||
|
||||
ERLANG_LICENSE = Apache-2.0
|
||||
ERLANG_LICENSE_FILES = LICENSE.txt
|
||||
ERLANG_CPE_ID_VENDOR = erlang
|
||||
ERLANG_CPE_ID_PRODUCT = erlang\/otp
|
||||
ERLANG_INSTALL_STAGING = YES
|
||||
|
||||
define ERLANG_FIX_AUTOCONF_VERSION
|
||||
$(SED) "s/USE_AUTOCONF_VERSION=.*/USE_AUTOCONF_VERSION=$(AUTOCONF_VERSION)/" $(@D)/otp_build
|
||||
endef
|
||||
|
||||
# Patched erts/aclocal.m4
|
||||
define ERLANG_RUN_AUTOCONF
|
||||
cd $(@D) && PATH=$(BR_PATH) ./otp_build update_configure --no-commit
|
||||
endef
|
||||
ERLANG_DEPENDENCIES += host-autoconf
|
||||
ERLANG_PRE_CONFIGURE_HOOKS += \
|
||||
ERLANG_FIX_AUTOCONF_VERSION \
|
||||
ERLANG_RUN_AUTOCONF
|
||||
HOST_ERLANG_DEPENDENCIES += host-autoconf
|
||||
HOST_ERLANG_PRE_CONFIGURE_HOOKS += \
|
||||
ERLANG_FIX_AUTOCONF_VERSION \
|
||||
ERLANG_RUN_AUTOCONF
|
||||
|
||||
# Return the EIV (Erlang Interface Version, EI_VSN)
|
||||
# $(1): base directory, i.e. either $(HOST_DIR) or $(STAGING_DIR)/usr
|
||||
erlang_ei_vsn = `sed -r -e '/^erl_interface-(.+)/!d; s//\1/' $(1)/lib/erlang/releases/$(ERLANG_RELEASE)/installed_application_versions`
|
||||
|
||||
# The configure checks for these functions fail incorrectly
|
||||
ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
|
||||
|
||||
# Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template
|
||||
# for documentation.
|
||||
ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR)
|
||||
|
||||
ERLANG_CONF_OPTS = --without-javac
|
||||
|
||||
# Force ERL_TOP to the downloaded source directory. This prevents
|
||||
# Erlang's configure script from inadvertently using files from
|
||||
# a version of Erlang installed on the host.
|
||||
ERLANG_CONF_ENV += ERL_TOP=$(@D)
|
||||
HOST_ERLANG_CONF_ENV += ERL_TOP=$(@D)
|
||||
|
||||
# erlang uses openssl for all things crypto. Since the host tools (such as
|
||||
# rebar) uses crypto, we need to build host-erlang with support for openssl.
|
||||
HOST_ERLANG_DEPENDENCIES += host-openssl
|
||||
HOST_ERLANG_CONF_OPTS = --without-javac --with-ssl=$(HOST_DIR)
|
||||
|
||||
HOST_ERLANG_CONF_OPTS += --without-termcap
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
||||
ERLANG_CONF_OPTS += --with-termcap
|
||||
ERLANG_DEPENDENCIES += ncurses
|
||||
else
|
||||
ERLANG_CONF_OPTS += --without-termcap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
ERLANG_CONF_OPTS += --with-ssl
|
||||
ERLANG_DEPENDENCIES += openssl
|
||||
else
|
||||
ERLANG_CONF_OPTS += --without-ssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UNIXODBC),y)
|
||||
ERLANG_DEPENDENCIES += unixodbc
|
||||
ERLANG_CONF_OPTS += --with-odbc
|
||||
else
|
||||
ERLANG_CONF_OPTS += --without-odbc
|
||||
endif
|
||||
|
||||
# Always use Buildroot's zlib
|
||||
ERLANG_CONF_OPTS += --disable-builtin-zlib
|
||||
ERLANG_DEPENDENCIES += zlib
|
||||
|
||||
# Remove source, example, gs and wx files from staging and target.
|
||||
ERLANG_REMOVE_PACKAGES = gs wx
|
||||
|
||||
ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y)
|
||||
ERLANG_REMOVE_PACKAGES += megaco
|
||||
endif
|
||||
|
||||
define ERLANG_REMOVE_STAGING_UNUSED
|
||||
for package in $(ERLANG_REMOVE_PACKAGES); do \
|
||||
rm -rf $(STAGING_DIR)/usr/lib/erlang/lib/$${package}-*; \
|
||||
done
|
||||
endef
|
||||
|
||||
define ERLANG_REMOVE_TARGET_UNUSED
|
||||
find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \;
|
||||
find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \;
|
||||
for package in $(ERLANG_REMOVE_PACKAGES); do \
|
||||
rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/$${package}-*; \
|
||||
done
|
||||
endef
|
||||
|
||||
ERLANG_POST_INSTALL_STAGING_HOOKS += ERLANG_REMOVE_STAGING_UNUSED
|
||||
ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_TARGET_UNUSED
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user