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,50 @@
From dc507a812d931c24f1ac98c811fdd29bffa21da9 Mon Sep 17 00:00:00 2001
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Date: Tue, 24 Aug 2021 00:36:40 +0200
Subject: [PATCH] libcap/Makefile: don't overwrite 'empty' when generating
loader.txt
objcopy takes an input file and an output file as arguments. If the
output file is left out, the input file will be overwritten.
Since the objcopy command used to generate loader.txt only does a
dump-section and no filtering, in practice there is no change to empty.
However, as a side-effect, its timestamp is updated. The timestamp of
empty and of loader.txt will be more or less the same; however,
loader.txt is closed just before the output file is closed, so it's
possible that the timestamp of loader.txt is just a little bit earlier.
If this happens, it causes loader.txt to be rebuilt later, which in turn
causes a number of other object files to be rebuilt.
Usually that's harmless, but it sometimes causes the rebuild to happen
during 'make install'. This is particularly annoying if 'make install'
is done as root, since loader.txt becomes owned by root in that case.
Fix this by specifying a harmless output file: /dev/null.
While we're at it, take in an upstream change that removes the redundant
redirect.
Fixes: ee3b25c0a877fa74d1aec88f325ac45b09963c82
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
libcap/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcap/Makefile b/libcap/Makefile
index 47cf8f4..18e4f4f 100644
--- a/libcap/Makefile
+++ b/libcap/Makefile
@@ -105,7 +105,7 @@ empty: empty.c
$(CC) -o $@ $<
loader.txt: empty
- $(OBJCOPY) --dump-section .interp=/dev/stdout $< > $@
+ $(OBJCOPY) --dump-section .interp=$@ $< /dev/null
cap_magic.o: execable.h execable.c loader.txt
$(CC) $(CFLAGS) $(IPATH) -DLIBRARY_VERSION=\"$(LIBTITLE)-$(VERSION).$(MINOR)\" -DSHARED_LOADER=\"$(shell cat loader.txt)\" -c execable.c -o $@
--
2.31.1
+24
View File
@@ -0,0 +1,24 @@
config BR2_PACKAGE_LIBCAP
bool "libcap"
depends on BR2_USE_MMU # fork()
help
This library implements the user-space interfaces to the
POSIX 1003.1e capabilities available in Linux kernels. These
capabilities are a partitioning of the all powerful root
privilege into a set of distinct privileges.
https://sites.google.com/site/fullycapable/
if BR2_PACKAGE_LIBCAP
config BR2_PACKAGE_LIBCAP_TOOLS
bool "install tools"
help
Install setcap, getcap, getpcaps and capsh tools.
For these tools to run properly, you should enable, in your
kernel configuration, extended file attributes/security labels
support for the file system type used on target system (e.g.
CONFIG_EXT2_FS_XATTR and CONFIG_EXT2_FS_SECURITY for ext2).
endif
+5
View File
@@ -0,0 +1,5 @@
# https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/sha256sums.asc
sha256 a2faacd55ae5959db1b0c695f91f256ac4c5e6b10acaeaeaf508ea1ee887fa97 libcap-2.52.tar.xz
# Hash for license file:
sha256 f58c80bcce8c929db39a23c32e924876e3311f3ffa54f66076c38056d38fa59b License
+72
View File
@@ -0,0 +1,72 @@
################################################################################
#
# libcap
#
################################################################################
LIBCAP_VERSION = 2.52
LIBCAP_SITE = https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2
LIBCAP_SOURCE = libcap-$(LIBCAP_VERSION).tar.xz
LIBCAP_LICENSE = GPL-2.0 or BSD-3-Clause
LIBCAP_LICENSE_FILES = License
LIBCAP_CPE_ID_VENDOR = libcap_project
LIBCAP_DEPENDENCIES = host-libcap host-gperf
LIBCAP_INSTALL_STAGING = YES
HOST_LIBCAP_DEPENDENCIES = host-gperf
LIBCAP_MAKE_FLAGS = \
CROSS_COMPILE="$(TARGET_CROSS)" \
BUILD_CC="$(HOSTCC)" \
BUILD_CFLAGS="$(HOST_CFLAGS)" \
lib=lib \
prefix=/usr \
SHARED=$(if $(BR2_STATIC_LIBS),,yes) \
PTHREADS=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,)
LIBCAP_MAKE_DIRS = libcap
ifeq ($(BR2_PACKAGE_LIBCAP_TOOLS),y)
LIBCAP_MAKE_DIRS += progs
endif
define LIBCAP_BUILD_CMDS
$(foreach d,$(LIBCAP_MAKE_DIRS), \
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$(d) \
$(LIBCAP_MAKE_FLAGS) all
)
endef
define LIBCAP_INSTALL_STAGING_CMDS
$(foreach d,$(LIBCAP_MAKE_DIRS), \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$(d) $(LIBCAP_MAKE_FLAGS) \
DESTDIR=$(STAGING_DIR) install
)
endef
define LIBCAP_INSTALL_TARGET_CMDS
$(foreach d,$(LIBCAP_MAKE_DIRS), \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$(d) $(LIBCAP_MAKE_FLAGS) \
DESTDIR=$(TARGET_DIR) install
)
endef
HOST_LIBCAP_MAKE_FLAGS = \
DYNAMIC=yes \
GOLANG=no \
lib=lib \
prefix=$(HOST_DIR) \
RAISE_SETFCAP=no
define HOST_LIBCAP_BUILD_CMDS
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
$(HOST_LIBCAP_MAKE_FLAGS)
endef
define HOST_LIBCAP_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBCAP_MAKE_FLAGS) install
endef
$(eval $(generic-package))
$(eval $(host-generic-package))