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
+31
View File
@@ -0,0 +1,31 @@
config BR2_PACKAGE_IPTABLES
bool "iptables"
help
Linux kernel firewall, NAT, and packet mangling tools.
http://www.netfilter.org/projects/iptables/index.html
if BR2_PACKAGE_IPTABLES
config BR2_PACKAGE_IPTABLES_BPF_NFSYNPROXY
bool "bpfc and nfsynproxy"
select BR2_PACKAGE_LIBPCAP
help
Build bpf compiler and nfsynproxy configuration tool.
config BR2_PACKAGE_IPTABLES_NFTABLES
bool "nftables compat"
# uses dlfcn
depends on !BR2_STATIC_LIBS
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
select BR2_PACKAGE_LIBMNL
select BR2_PACKAGE_LIBNFTNL
help
Build nftables compat utilities.
comment "nftables compat needs a toolchain w/ wchar, dynamic library, headers >= 3.12"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
!BR2_USE_WCHAR || BR2_STATIC_LIBS
endif
+58
View File
@@ -0,0 +1,58 @@
#!/bin/sh
DAEMON="iptables"
IPTABLES_ARGS=""
start() {
printf 'Starting %s: ' "$DAEMON"
iptables-restore /etc/iptables.conf
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
iptables -F
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
save() {
printf 'Saving %s: ' "$DAEMON"
iptables-save -f /etc/iptables.conf
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "SKIP (read-only file system detected)"
fi
return "$status"
}
case "$1" in
start|stop|restart|save)
"$1";;
reload)
# Restart, since there is no true "reload" feature.
restart;;
*)
echo "Usage: $0 {start|stop|restart|save|reload}"
exit 1
esac
+4
View File
@@ -0,0 +1,4 @@
# From https://netfilter.org/projects/iptables/downloads.html
sha256 c109c96bb04998cd44156622d36f8e04b140701ec60531a10668cfdff5e8d8f0 iptables-1.8.7.tar.bz2
# Locally calculated
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
+66
View File
@@ -0,0 +1,66 @@
################################################################################
#
# iptables
#
################################################################################
IPTABLES_VERSION = 1.8.7
IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2
IPTABLES_SITE = https://netfilter.org/projects/iptables/files
IPTABLES_INSTALL_STAGING = YES
IPTABLES_DEPENDENCIES = host-pkgconf \
$(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
IPTABLES_LICENSE = GPL-2.0
IPTABLES_LICENSE_FILES = COPYING
IPTABLES_CPE_ID_VENDOR = netfilter
IPTABLES_SELINUX_MODULES = iptables
# Building static causes ugly warnings on some plugins
IPTABLES_CONF_OPTS = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr \
$(if $(BR2_STATIC_LIBS),,--disable-static)
# For connlabel match
ifeq ($(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),y)
IPTABLES_DEPENDENCIES += libnetfilter_conntrack
endif
# For nfnl_osf
ifeq ($(BR2_PACKAGE_LIBNFNETLINK),y)
IPTABLES_DEPENDENCIES += libnfnetlink
endif
# For iptables-compat tools
ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),y)
IPTABLES_CONF_OPTS += --enable-nftables
IPTABLES_DEPENDENCIES += host-bison host-flex libmnl libnftnl
else
IPTABLES_CONF_OPTS += --disable-nftables
endif
# bpf compiler support and nfsynproxy tool
ifeq ($(BR2_PACKAGE_IPTABLES_BPF_NFSYNPROXY),y)
# libpcap is tricky for static-only builds and needs help
ifeq ($(BR2_STATIC_LIBS),y)
IPTABLES_LIBS_FOR_STATIC_LINK += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
IPTABLES_CONF_OPTS += LIBS="$(IPTABLES_LIBS_FOR_STATIC_LINK)"
endif
IPTABLES_CONF_OPTS += --enable-bpf-compiler --enable-nfsynproxy
IPTABLES_DEPENDENCIES += libpcap
else
IPTABLES_CONF_OPTS += --disable-bpf-compiler --disable-nfsynproxy
endif
define IPTABLES_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES)
endef
define IPTABLES_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/iptables/S35iptables \
$(TARGET_DIR)/etc/init.d/S35iptables
touch $(TARGET_DIR)/etc/iptables.conf
endef
$(eval $(autotools-package))