Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
From 52bc36f5a548543835c24b87e7b7b72a327b1df7 Mon Sep 17 00:00:00 2001
From: RDW <duckwhale@mail.ru>
Date: Sun, 14 Sep 2025 00:33:10 +0200
Subject: [PATCH] Selectively disable GCC diagnostics in ocsp.c
GCC 14 fails to compile the library because -Wincompatible-pointer-types is now fatal.
Since the warning is already disabled for clang here, might as well include GCC also.
Needless to say, this is a workaround and a proper fix would require upstream changes.
Upstream: https://github.com/zhaozg/lua-openssl/commit/bfeedbe8c06d8b4400fa670edecd452a433ddac4
[Romain:
- rebase on lua-openssl 0.9.0-0
- format the patch as luvi patch (patching lua-openssl submodule)
]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
deps/lua-openssl/src/ocsp.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/deps/lua-openssl/src/ocsp.c b/deps/lua-openssl/src/ocsp.c
index ac67a53..00e3b61 100644
--- a/deps/lua-openssl/src/ocsp.c
+++ b/deps/lua-openssl/src/ocsp.c
@@ -183,15 +183,26 @@ static int openssl_ocsp_request_read(lua_State *L)
BIO *bio = load_bio_object(L, 1);
int pem = lua_gettop(L) > 1 ? auxiliar_checkboolean(L, 2) : 0;
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
+#endif
+
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
OCSP_REQUEST *req = pem ? PEM_read_bio_OCSP_REQUEST(bio, NULL, NULL)
: d2i_OCSP_REQUEST_bio(bio, NULL);
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
+
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
+
BIO_free(bio);
if (req)
@@ -359,15 +370,26 @@ static int openssl_ocsp_response_read(lua_State *L)
int pem = lua_gettop(L) > 1 ? auxiliar_checkboolean(L, 2) : 0;
int ret = 0;
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
+#endif
+
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
OCSP_RESPONSE *res = pem ? PEM_read_bio_OCSP_RESPONSE(bio, NULL, NULL)
: d2i_OCSP_RESPONSE_bio(bio, NULL);
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
+
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
+
if (res)
{
PUSH_OBJECT(res, "openssl.ocsp_response");
--
2.51.0

View File

@@ -0,0 +1,54 @@
From c82c147e83d6a21f572353bf6e95dcf3a736490c Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@smile.fr>
Date: Sat, 13 Sep 2025 23:21:04 +0200
Subject: [PATCH] CMakeLists.txt: disable Wincompatible-pointer-types for gcc
>= 14
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Backport partially a patch [1] disabling GCC 14 warning
Wincompatible-pointer-types.
From [1]:
"lua-openssl triggering the incompatible pointer types error by
silencing the warning, which lua-openssl does internally but only for
clang."
Latest lua-openssl version (0.9.1-0) also disable this warning [2].
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/11271124430 (TestLuvi)
[1] https://github.com/luvit/luvi/commit/85d7d7bf51bc523159ad579d846cbefbbff38fdb
[2] https://github.com/zhaozg/lua-openssl/commit/bfeedbe8c06d8b4400fa670edecd452a433ddac4
Upstream: https://github.com/luvit/luvi/commit/85d7d7bf51bc523159ad579d846cbefbbff38fdb
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
CMakeLists.txt | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b0007d..bf10de5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -141,6 +141,14 @@ if (WIN32)
add_library (luvi_renamed src/luvi_renamed.c)
endif ()
+if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
+ add_compile_options(-Wno-incompatible-pointer-types)
+endif()
+
+if(UNIX)
+ add_definitions(-Wall)
+endif()
+
if (WITH_LUA_ENGINE STREQUAL Lua)
add_definitions(-DWITH_PLAIN_LUA)
endif ()
--
2.51.0

37
package/luvi/Config.in Normal file
View File

@@ -0,0 +1,37 @@
config BR2_PACKAGE_LUVI
bool "luvi"
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
depends on BR2_USE_MMU # libuv
depends on !BR2_STATIC_LIBS # libuv
depends on BR2_PACKAGE_LUAJIT
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libuv
select BR2_PACKAGE_LIBUV
select BR2_PACKAGE_LUV
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
select BR2_PACKAGE_LIBOPENSSL_ENGINES if BR2_PACKAGE_LIBOPENSSL
help
A project in-between luv and luvit. The goal of this is to
make building luvit and derivatives much easier.
luvi extends LuaJIT with asynchronous I/O and several optional
modules to run Lua applications and build self-contained
binaries on systems that don't have a compiler.
The luvi core can be extended with several Lua modules by
adding its bundled Lua binding libraries.
To get the Lua module...
* 'rex' select PCRE2 (BR2_PACKAGE_PCRE2)
* 'ssl' select OpenSSL (BR2_PACKAGE_OPENSSL)
* 'zlib' select zlib (BR2_PACKAGE_ZLIB)
https://github.com/luvit/luvi
comment "luvi needs a toolchain w/ NPTL, dynamic library, gcc >= 4.9"
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_SYNC_4
comment "luvi needs LuaJIT"
depends on !BR2_PACKAGE_LUAJIT

3
package/luvi/luvi.hash Normal file
View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 f933bf1899a5419b26d46d7f111aaa50101831922716ffaed62e355b1bc9de1d luvi-v2.15.0-git4.tar.gz
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt

72
package/luvi/luvi.mk Normal file
View File

@@ -0,0 +1,72 @@
################################################################################
#
# luvi
#
################################################################################
LUVI_VERSION = v2.15.0
LUVI_SITE = https://github.com/luvit/luvi.git
LUVI_SITE_METHOD = git
LUVI_GIT_SUBMODULES = YES
LUVI_LICENSE = Apache-2.0
LUVI_LICENSE_FILES = LICENSE.txt
LUVI_DEPENDENCIES = libuv luajit luv host-luajit host-pkgconf
# Dispatch all architectures of LuaJIT
ifeq ($(BR2_i386),y)
LUVI_TARGET_ARCH = x86
else ifeq ($(BR2_x86_64),y)
LUVI_TARGET_ARCH = x64
else ifeq ($(BR2_powerpc),y)
LUVI_TARGET_ARCH = ppc
else ifeq ($(BR2_arm)$(BR2_armeb),y)
LUVI_TARGET_ARCH = arm
else ifeq ($(BR2_aarch64),y)
LUVI_TARGET_ARCH = arm64
else ifeq ($(BR2_aarch64_be),y)
LUVI_TARGET_ARCH = arm64be
else ifeq ($(BR2_mips),y)
LUVI_TARGET_ARCH = mips
else ifeq ($(BR2_mipsel),y)
LUVI_TARGET_ARCH = mipsel
else
LUVI_TARGET_ARCH = $(BR2_ARCH)
endif
# LUAJIT_VERSION and the luajit installation path may not use the
# same value. Use the value from luajit.pc file.
LUVI_LUAJIT_MAJVER = `$(PKG_CONFIG_HOST_BINARY) --variable=majver luajit`
LUVI_LUAJIT_MINVER = `$(PKG_CONFIG_HOST_BINARY) --variable=minver luajit`
# Bundled lua bindings have to be linked statically into the luvi executable
LUVI_CONF_OPTS = \
-DBUILD_SHARED_LIBS=OFF \
-DWithSharedLibluv=ON \
-DTARGET_ARCH=$(LUVI_TARGET_ARCH) \
-DLUA_PATH=$(HOST_DIR)/share/luajit-$(LUVI_LUAJIT_MAJVER).$(LUVI_LUAJIT_MINVER)/?.lua
# Add "rex" module (PCRE2 via bundled lrexlib)
ifeq ($(BR2_PACKAGE_PCRE2),y)
LUVI_DEPENDENCIES += pcre2
LUVI_CONF_OPTS += -DWithPCRE2=ON -DWithSharedPCRE2=ON
else
LUVI_CONF_OPTS += -DWithPCRE2=OFF -DWithSharedPCRE2=OFF
endif
# Add "ssl" module (via bundled lua-openssl)
ifeq ($(BR2_PACKAGE_OPENSSL),y)
LUVI_DEPENDENCIES += openssl
LUVI_CONF_OPTS += -DWithOpenSSL=ON -DWithOpenSSLASM=ON -DWithSharedOpenSSL=ON
else
LUVI_CONF_OPTS += -DWithOpenSSL=OFF -DWithOpenSSLASM=OFF -DWithSharedOpenSSL=OFF
endif
# Add "zlib" module (via bundled lua-zlib)
ifeq ($(BR2_PACKAGE_ZLIB),y)
LUVI_DEPENDENCIES += zlib
LUVI_CONF_OPTS += -DWithZLIB=ON -DWithSharedZLIB=ON
else
LUVI_CONF_OPTS += -DWithZLIB=OFF -DWithSharedZLIB=OFF
endif
$(eval $(cmake-package))