initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,47 @@
From 2140db697c7f1da2a0a3f7bbcb14c1a0dade84e5 Mon Sep 17 00:00:00 2001
From: Adam Duskett <aduskett@gmail.com>
Date: Mon, 9 Oct 2017 16:28:12 -0400
Subject: [PATCH] Add support for static-only build
Instead of unconditionally building shared libraries, this patch
improves the libsepol build system with a "STATIC" variable, which
when defined to some non-empty value, will disable the build of shared
libraries. It allows to support cases where the target architecture
does not have support for shared libraries.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Update for 2.8]
---
src/Makefile | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff -durNw libsepol-2.7.orig/src/Makefile libsepol-2.7/src/Makefile
--- libsepol-2.7.orig/src/Makefile 2018-01-15 21:07:51.285183415 +0100
+++ libsepol-2.7/src/Makefile 2018-01-15 21:08:56.515182717 +0100
@@ -39,7 +39,12 @@
LN=gln
endif
-all: $(LIBA) $(LIBSO) $(LIBPC)
+ALL_TARGETS = $(LIBA) $(LIBPC)
+ifeq ($(STATIC),)
+ALL_TARGETS += $(LIBSO)
+endif
+
+all: $(ALL_TARGETS)
$(LIBA): $(OBJS)
@@ -81,8 +86,10 @@
install: all
test -d $(DESTDIR)$(LIBDIR) || install -m 755 -d $(DESTDIR)$(LIBDIR)
install -m 644 $(LIBA) $(DESTDIR)$(LIBDIR)
+ifeq ($(STATIC),)
test -d $(DESTDIR)$(SHLIBDIR) || install -m 755 -d $(DESTDIR)$(SHLIBDIR)
install -m 755 $(LIBSO) $(DESTDIR)$(SHLIBDIR)
+endif
test -d $(DESTDIR)$(LIBDIR)/pkgconfig || install -m 755 -d $(DESTDIR)$(LIBDIR)/pkgconfig
install -m 644 $(LIBPC) $(DESTDIR)$(LIBDIR)/pkgconfig
$(LN) -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
+39
View File
@@ -0,0 +1,39 @@
config BR2_PACKAGE_LIBSEPOL
bool "libsepol"
depends on BR2_TOOLCHAIN_HAS_THREADS # pthread
help
Libsepol is the binary policy manipulation library. It doesn't
depend upon or use any of the other SELinux components.
http://selinuxproject.org/page/Main_Page
if BR2_PACKAGE_LIBSEPOL
config BR2_PACKAGE_LIBSEPOL_POLICY_VERSION
int "Policy version"
default 33 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_8
default 32 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_5
default 31 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
default 30 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
default 29 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
default 28 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
default 26 if BR2_TOOLCHAIN_HEADERS_AT_LEAST_2_6
default 25
help
The maximum SELinux policy version your kernel supports.
Here's a handy table to help you choose:
kernel version SElinux policy max version
< 2.6.x 25
>= 2.6 < 3.5 26
>= 3.5 < 3.14 28 (27 and 28 were added at the same time)
>= 3.14 < 4.3 29
>= 4.3 < 4.13 30
>= 4.13 < 5.5 31
>= 5.5 < 5.8 32
>= 5.8 33
endif
comment "libsepol needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
+5
View File
@@ -0,0 +1,5 @@
# From: https://github.com/SELinuxProject/selinux/wiki/Releases
sha256 dfc7f662af8000116e56a01de6a0394ed79be1b34b999e551346233c5dd19508 libsepol-3.2.tar.gz
# Hash for license file
sha256 6095e9ffa777dd22839f7801aa845b31c9ed07f3d6bf8a26dc5d2dec8ccc0ef3 COPYING
+53
View File
@@ -0,0 +1,53 @@
################################################################################
#
# libsepol
#
################################################################################
LIBSEPOL_VERSION = 3.2
LIBSEPOL_SITE = https://github.com/SELinuxProject/selinux/releases/download/$(LIBSEPOL_VERSION)
LIBSEPOL_LICENSE = LGPL-2.1+
LIBSEPOL_LICENSE_FILES = COPYING
LIBSEPOL_CPE_ID_VENDOR = selinuxproject
LIBSEPOL_INSTALL_STAGING = YES
LIBSEPOL_DEPENDENCIES = host-flex
HOST_LIBSEPOL_DEPENDENCIES = $(BR2_COREUTILS_HOST_DEPENDENCY) host-flex
LIBSEPOL_MAKE_FLAGS = $(TARGET_CONFIGURE_OPTS)
ifeq ($(BR2_STATIC_LIBS),y)
LIBSEPOL_MAKE_FLAGS += STATIC=1
endif
define LIBSEPOL_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_FLAGS)
endef
# Set SHLIBDIR to /usr/lib so it has the same value than LIBDIR, as a result
# we won't have to use a relative path in 0002-revert-ln-relative.patch
define LIBSEPOL_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) \
DESTDIR=$(STAGING_DIR) SHLIBDIR=/usr/lib
endef
define LIBSEPOL_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) \
DESTDIR=$(TARGET_DIR) SHLIBDIR=/usr/lib
endef
HOST_LIBSEPOL_MAKE_ENV = \
$(HOST_MAKE_ENV) \
PREFIX=$(HOST_DIR) \
SHLIBDIR=$(HOST_DIR)/lib
define HOST_LIBSEPOL_BUILD_CMDS
$(HOST_LIBSEPOL_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS)
endef
define HOST_LIBSEPOL_INSTALL_CMDS
$(HOST_LIBSEPOL_MAKE_ENV) $(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS)
endef
$(eval $(generic-package))
$(eval $(host-generic-package))