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,26 @@
Do not use a symlink for the binary, simply name it luajit
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -51,8 +51,7 @@
INSTALL_MAN= $(INSTALL_SHARE)/man/man1
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
-INSTALL_TNAME= luajit-$(VERSION)
-INSTALL_TSYMNAME= luajit
+INSTALL_TNAME= luajit
INSTALL_ANAME= libluajit-$(ABIVER).a
INSTALL_SOSHORT1= libluajit-$(ABIVER).so
INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
@@ -67,7 +66,6 @@
INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT1)
INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT2)
INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME)
-INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME)
INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \

View File

@@ -0,0 +1,17 @@
Install includes like lua's ones
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
INSTALL_SHARE_= $(PREFIX)/share
INSTALL_SHARE= $(DESTDIR)$(INSTALL_SHARE_)
-INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
+INSTALL_DEFINC= $(DPREFIX)/include
INSTALL_INC= $(INSTALL_DEFINC)
export INSTALL_LJLIBD= $(INSTALL_SHARE_)/luajit-$(MMVERSION)

49
package/luajit/Config.in Normal file
View File

@@ -0,0 +1,49 @@
config BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
bool
default y if BR2_arm || BR2_aarch64 || BR2_aarch64_be
default y if BR2_i386 || BR2_x86_64
default y if (BR2_mips || BR2_mipsel) && !BR2_MIPS_SOFT_FLOAT \
&& !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
default y if BR2_powerpc
# -m32 flag is used for 32bit builds and host-luajit has
# limited architecture support
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
# Building for 64-bit target requires a 64-bit host
depends on !BR2_ARCH_IS_64 || BR2_HOSTARCH = "x86_64"
config BR2_PACKAGE_LUAJIT
bool "luajit"
depends on !BR2_STATIC_LIBS # dlopen
# Luajit conflicts with the regular lua package
depends on !BR2_PACKAGE_LUA
# Luajit is only available for some target architectures, and
# has some complexity wrt 32/64. See luajit.mk for details.
depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
# luajit.mk uses the "-m32" compiler option to build 32bit
# binaries, so check if that option is supported. See
# luajit.mk for details.
select BR2_PACKAGE_HAS_LUAINTERPRETER
select BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64
help
LuaJIT implements the full set of language features defined
by Lua 5.1. The virtual machine (VM) is API- and
ABI-compatible to the standard Lua interpreter and can be
deployed as a drop-in replacement.
https://luajit.org/luajit.html
if BR2_PACKAGE_LUAJIT
config BR2_PACKAGE_PROVIDES_LUAINTERPRETER
default "luajit"
config BR2_PACKAGE_LUAJIT_COMPAT52
bool "Lua 5.2 compatibility"
help
Compile with Lua 5.2 compatibility.
endif
comment "luajit needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS

View File

@@ -0,0 +1,5 @@
# Locally calculated
sha256 ac2defd1e9b4ab07ac0a52f2403318ffb0d54505b975dff0cfc49a927ab84d90 luajit-707c12bf00dafdfd3899b1a6c36435dbbf6c7022.tar.gz
# Locally calculated
sha256 6cda3076a8c09b31bb1f90da614ea89e7ee194589626eeac613e522849604e47 COPYRIGHT

98
package/luajit/luajit.mk Normal file
View File

@@ -0,0 +1,98 @@
################################################################################
#
# luajit
#
################################################################################
LUAJIT_VERSION = 707c12bf00dafdfd3899b1a6c36435dbbf6c7022
LUAJIT_SITE = $(call github,LuaJIT,LuaJIT,$(LUAJIT_VERSION))
LUAJIT_LICENSE = MIT
LUAJIT_LICENSE_FILES = COPYRIGHT
LUAJIT_CPE_ID_VENDOR = luajit
LUAJIT_CPE_ID_VERSION = 2.1.0
LUAJIT_CPE_ID_UPDATE = beta3
# Fixed in 53f82e6e2e858a0a62fd1a2ff47e9866693382e6
LUAJIT_IGNORE_CVES += CVE-2020-15890
# Fixed in e296f56b825c688c3530a981dc6b495d972f3d01
LUAJIT_IGNORE_CVES += CVE-2020-24372
# Fixed in 343ce0edaf3906a62022936175b2f5410024cbfc
LUAJIT_IGNORE_CVES += CVE-2024-25176
# Fixed in 85b4fed0b0353dd78c8c875c2f562d522a2b310f
LUAJIT_IGNORE_CVES += CVE-2024-25177
# Fixed in defe61a56751a0db5f00ff3ab7b8f45436ba74c8
LUAJIT_IGNORE_CVES += CVE-2024-25178
LUAJIT_INSTALL_STAGING = YES
LUAJIT_PROVIDES = luainterpreter
ifeq ($(BR2_PACKAGE_LUAJIT_COMPAT52),y)
LUAJIT_XCFLAGS += -DLUAJIT_ENABLE_LUA52COMPAT
endif
# The luajit build procedure requires the host compiler to have the
# same bitness as the target compiler. Therefore, on a x86 build
# machine, we can't build luajit for x86_64, which is checked in
# Config.in. When the target is a 32 bits target, we pass -m32 to
# ensure that even on 64 bits build machines, a compiler of the same
# bitness is used. Of course, this assumes that the 32 bits multilib
# libraries are installed.
ifeq ($(BR2_ARCH_IS_64),y)
LUAJIT_HOST_CC = $(HOSTCC)
# There is no LUAJIT_ENABLE_GC64 option.
else
LUAJIT_HOST_CC = $(HOSTCC) -m32
LUAJIT_XCFLAGS += -DLUAJIT_DISABLE_GC64
endif
# We unfortunately can't use TARGET_CONFIGURE_OPTS, because the luajit
# build system uses non conventional variable names.
define LUAJIT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) PREFIX="/usr" \
STATIC_CC="$(TARGET_CC)" \
DYNAMIC_CC="$(TARGET_CC) -fPIC" \
TARGET_LD="$(TARGET_CC)" \
TARGET_AR="$(TARGET_AR) rcus" \
TARGET_STRIP=true \
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
HOST_CC="$(LUAJIT_HOST_CC)" \
HOST_CFLAGS="$(HOST_CFLAGS)" \
HOST_LDFLAGS="$(HOST_LDFLAGS)" \
BUILDMODE=dynamic \
XCFLAGS="$(LUAJIT_XCFLAGS)" \
-C $(@D) amalg
endef
define LUAJIT_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" LDCONFIG=true -C $(@D) install
endef
define LUAJIT_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" LDCONFIG=true -C $(@D) install
endef
define LUAJIT_INSTALL_SYMLINK
ln -fs luajit $(TARGET_DIR)/usr/bin/lua
endef
LUAJIT_POST_INSTALL_TARGET_HOOKS += LUAJIT_INSTALL_SYMLINK
# host-efl package needs host-luajit to be linked dynamically.
define HOST_LUAJIT_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) PREFIX="$(HOST_DIR)" BUILDMODE=dynamic \
TARGET_LDFLAGS="$(HOST_LDFLAGS)" \
XCFLAGS="$(LUAJIT_XCFLAGS)" \
-C $(@D) amalg
endef
define HOST_LUAJIT_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) PREFIX="$(HOST_DIR)" LDCONFIG=true -C $(@D) install
endef
$(eval $(generic-package))
$(eval $(host-generic-package))