Merge Mainline
This commit is contained in:
commit
6b1eb31f16
@ -158,6 +158,7 @@ define Build/fit
|
||||
-D $(DEVICE_NAME) -o $@.its -k $@ \
|
||||
$(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
|
||||
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
|
||||
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \
|
||||
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
|
||||
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
|
||||
|
||||
@ -243,8 +243,7 @@ endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y)
|
||||
define Image/mkfs/squashfs
|
||||
echo "LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:$(STAGING_DIR_HOSTPKG)/lib" \
|
||||
"$(STAGING_DIR_HOSTPKG)/sbin/setfiles -r" \
|
||||
echo "$(STAGING_DIR_HOSTPKG)/bin/setfiles -r" \
|
||||
"$(call mkfs_target_dir,$(1))" \
|
||||
"$(call mkfs_target_dir,$(1))/etc/selinux/targeted/contexts/files/file_contexts " \
|
||||
"$(call mkfs_target_dir,$(1))" > $@.fakeroot-script
|
||||
@ -398,13 +397,13 @@ define Device/Init
|
||||
DEVICE_NAME := $(1)
|
||||
KERNEL:=
|
||||
KERNEL_INITRAMFS = $$(KERNEL)
|
||||
KERNEL_SIZE:=
|
||||
CMDLINE:=
|
||||
|
||||
IMAGES :=
|
||||
ARTIFACTS :=
|
||||
IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
|
||||
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
|
||||
IMAGE_SIZE :=
|
||||
KERNEL_PREFIX = $$(IMAGE_PREFIX)
|
||||
KERNEL_SUFFIX := -kernel.bin
|
||||
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
|
||||
@ -432,6 +431,7 @@ define Device/Init
|
||||
DEVICE_DTS :=
|
||||
DEVICE_DTS_CONFIG :=
|
||||
DEVICE_DTS_DIR :=
|
||||
DEVICE_FDT_NUM :=
|
||||
SOC :=
|
||||
|
||||
BOARD_NAME :=
|
||||
@ -450,9 +450,9 @@ DEFAULT_DEVICE_VARS := \
|
||||
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
|
||||
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
|
||||
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR SOC BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \
|
||||
IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH DEVICE_VENDOR \
|
||||
DEVICE_MODEL DEVICE_VARIANT \
|
||||
DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM SOC BOARD_NAME UIMAGE_NAME \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH \
|
||||
IMAGE_SIZE DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
|
||||
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
|
||||
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
|
||||
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT
|
||||
|
||||
@ -61,7 +61,7 @@ endif
|
||||
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
|
||||
|
||||
filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
|
||||
extra_packages = $(if $(filter wpad-mini wpad-basic wpad-basic-wolfssl wpad nas,$(1)),iwinfo)
|
||||
extra_packages = $(if $(filter wpad wpad-% nas,$(1)),iwinfo)
|
||||
|
||||
define ProfileDefault
|
||||
NAME:=
|
||||
|
||||
@ -159,3 +159,19 @@ define KernelPackage/leds-pca963x/description
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-pca963x))
|
||||
|
||||
|
||||
define KernelPackage/leds-pwm
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=PWM driven LED Support
|
||||
KCONFIG:=CONFIG_LEDS_PWM
|
||||
DEPENDS:= @PWM_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-pwm.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-pwm,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-pwm/description
|
||||
This option enables support for pwm driven LEDs
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-pwm))
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=frp
|
||||
PKG_VERSION:=0.33.0
|
||||
PKG_VERSION:=0.34.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=9c773ab4bbd208705c795599c5e69302a379734921c90489ed8ae331c24836cb
|
||||
PKG_HASH:=3c4f354c7c82eb5001f0de5a55015acbaa1fba03aa97647a74131bc4118598a8
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=n2n
|
||||
PKG_SOURCE_URL:=https://github.com/ntop/n2n.git
|
||||
PKG_SOURCE_VERSION:=3c983286184ebf2e06db6ccfb3223ea9430c216b
|
||||
PKG_SOURCE_VERSION:=99e56e9f3c34c49eeb297971d41150b433489120
|
||||
PKG_VERSION:=2.8.0_git-$(PKG_SOURCE_VERSION)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
|
||||
@ -7,26 +7,71 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libselinux
|
||||
PKG_VERSION:=3.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710
|
||||
PKG_HASH:=ea5dcbb4d859e3f999c26a13c630da2f16dff9462e3cc8cb7b458ac157d112e7
|
||||
HOST_BUILD_DEPENDS:=libsepol/host pcre/host
|
||||
|
||||
PKG_LICENSE:=libselinux-1.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/libselinux
|
||||
SECTION:=libs
|
||||
DEPENDS:=+libsepol +libpcre +musl-fts
|
||||
CATEGORY:=Libraries
|
||||
LIBSELINUX_UTILS := \
|
||||
avcstat \
|
||||
compute_av \
|
||||
compute_create \
|
||||
compute_member \
|
||||
compute_relabel \
|
||||
getconlist \
|
||||
getdefaultcon \
|
||||
getenforce \
|
||||
getfilecon \
|
||||
getpidcon \
|
||||
getsebool \
|
||||
getseuser \
|
||||
matchpathcon \
|
||||
policyvers \
|
||||
sefcontext_compile \
|
||||
selabel_digest \
|
||||
selabel_get_digests_all_partial_matches \
|
||||
selabel_lookup \
|
||||
selabel_lookup_best_match \
|
||||
selabel_partial_match \
|
||||
selinux_check_access \
|
||||
selinux_check_securetty_context \
|
||||
selinuxenabled \
|
||||
selinuxexeccon \
|
||||
setenforce \
|
||||
setfilecon \
|
||||
togglesebool \
|
||||
validatetrans
|
||||
|
||||
LIBSELINUX_ALTS := \
|
||||
getenforce \
|
||||
getsebool \
|
||||
matchpathcon \
|
||||
selinuxenabled \
|
||||
setenforce
|
||||
|
||||
$(eval $(foreach a,$(LIBSELINUX_ALTS),ALTS_$(a):=300:/usr/sbin/$(a):/usr/sbin/libselinux-$(a)$(newline)))
|
||||
|
||||
define Package/libselinux/Default
|
||||
TITLE:=Runtime SELinux library
|
||||
URL:=http://selinuxproject.org/page/Main_Page
|
||||
endef
|
||||
|
||||
define Package/libselinux
|
||||
$(call Package/libselinux/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libsepol +libpcre +musl-fts
|
||||
endef
|
||||
|
||||
define Package/libselinux/description
|
||||
libselinux is the runtime SELinux library that provides
|
||||
interfaces (e.g. library functions for the SELinux kernel
|
||||
@ -37,14 +82,24 @@ define Package/libselinux/description
|
||||
older version supported by the kernel) when loading policy.
|
||||
endef
|
||||
|
||||
define Package/libselinux-utils
|
||||
SECTION:=utils
|
||||
DEPENDS:=+libselinux
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Runtime SELinux utilities
|
||||
URL:=http://selinuxproject.org/page/Main_Page
|
||||
define GenUtilPkg
|
||||
define Package/$(1)
|
||||
$(call Package/libselinux/Default)
|
||||
TITLE+= $(2) utility
|
||||
SECTION:=utils
|
||||
DEPENDS:=+libselinux
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=libselinux tools
|
||||
ALTERNATIVES:=$(ALTS_$(2))
|
||||
endef
|
||||
|
||||
define Package/$(1)/description
|
||||
libselinux version of the $(2) utility.
|
||||
endef
|
||||
endef
|
||||
|
||||
$(foreach a,$(LIBSELINUX_UTILS),$(eval $(call GenUtilPkg,libselinux-$(a),$(a))))
|
||||
|
||||
# Needed to link libselinux utilities, which link against
|
||||
# libselinux.so, which indirectly depends on libpcre.so, installed in
|
||||
# $(STAGING_DIR_HOSTPKG).
|
||||
@ -83,11 +138,15 @@ define Package/libselinux/install
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libselinux.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libselinux-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
|
||||
define BuildUtil
|
||||
define Package/$(1)/install
|
||||
$(INSTALL_DIR) $$(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(2) $$(1)/usr/sbin/$(if $(ALTS_$(2)),libselinux-$(2),$(2))
|
||||
endef
|
||||
|
||||
$$(eval $$(call BuildPackage,$(1)))
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,libselinux))
|
||||
$(eval $(call BuildPackage,libselinux-utils))
|
||||
$(foreach a,$(LIBSELINUX_UTILS),$(eval $(call BuildUtil,libselinux-$(a),$(a))))
|
||||
|
||||
@ -30,6 +30,18 @@ define Package/libsepol/description
|
||||
depend upon or use any of the other SELinux components.
|
||||
endef
|
||||
|
||||
define Package/chkcon
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libsepol
|
||||
TITLE:=libsepol chkcon security context validation tool
|
||||
URL:=http://selinuxproject.org/page/Main_Page
|
||||
endef
|
||||
|
||||
define Package/chkcon/description
|
||||
chkcon - determine if a security context is valid for a given binary policy
|
||||
endef
|
||||
|
||||
HOST_MAKE_FLAGS += \
|
||||
PREFIX=$(STAGING_DIR_HOSTPKG) \
|
||||
SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib
|
||||
@ -62,5 +74,11 @@ define Package/libsepol/install
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsepol.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/chkcon/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chkcon $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,libsepol))
|
||||
$(eval $(call BuildPackage,chkcon))
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=vxlan
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=6
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -59,8 +59,8 @@ vxlan_generic_setup() {
|
||||
|
||||
local link="$cfg"
|
||||
|
||||
local port vid ttl tos mtu macaddr zone rxcsum txcsum
|
||||
json_get_vars port vid ttl tos mtu macaddr zone rxcsum txcsum
|
||||
local port vid ttl tos mtu macaddr zone rxcsum txcsum srcportmin srcportmax ageing maxaddress learning rsc proxy l2miss l3miss gbp
|
||||
json_get_vars port vid ttl tos mtu macaddr zone rxcsum txcsum srcportmin srcportmax ageing maxaddress learning rsc proxy l2miss l3miss gbp
|
||||
|
||||
proto_init_update "$link" 1
|
||||
|
||||
@ -78,9 +78,20 @@ vxlan_generic_setup() {
|
||||
json_add_object 'data'
|
||||
[ -n "$port" ] && json_add_int port "$port"
|
||||
[ -n "$vid" ] && json_add_int id "$vid"
|
||||
[ -n "$srcportmin" ] && json_add_int srcportmin "$srcportmin"
|
||||
[ -n "$srcportmax" ] && json_add_int srcportmax "$srcportmax"
|
||||
[ -n "$ageing" ] && json_add_int ageing "$ageing"
|
||||
[ -n "$maxaddress" ] && json_add_int maxaddress "$maxaddress"
|
||||
[ -n "$macaddr" ] && json_add_string macaddr "$macaddr"
|
||||
[ -n "$rxcsum" ] && json_add_boolean rxcsum "$rxcsum"
|
||||
[ -n "$txcsum" ] && json_add_boolean txcsum "$txcsum"
|
||||
[ -n "$learning" ] && json_add_boolean learning "$learning"
|
||||
[ -n "$rsc" ] && json_add_boolean rsc "$rsc"
|
||||
[ -n "$proxy" ] && json_add_boolean proxy "$proxy"
|
||||
[ -n "$l2miss" ] && json_add_boolean l2miss "$l2miss"
|
||||
[ -n "$l3miss" ] && json_add_boolean l3miss "$l3miss"
|
||||
[ -n "$gbp" ] && json_add_boolean gbp "$gbp"
|
||||
|
||||
json_close_object
|
||||
|
||||
proto_close_tunnel
|
||||
@ -163,9 +174,20 @@ vxlan_generic_init_config() {
|
||||
proto_config_add_int "ttl"
|
||||
proto_config_add_int "tos"
|
||||
proto_config_add_int "mtu"
|
||||
proto_config_add_int "srcportmin"
|
||||
proto_config_add_int "srcportmax"
|
||||
proto_config_add_int "ageing"
|
||||
proto_config_add_int "maxaddress"
|
||||
proto_config_add_boolean "rxcsum"
|
||||
proto_config_add_boolean "txcsum"
|
||||
proto_config_add_boolean "learning"
|
||||
proto_config_add_boolean "rsc"
|
||||
proto_config_add_boolean "proxy"
|
||||
proto_config_add_boolean "l2miss"
|
||||
proto_config_add_boolean "l3miss"
|
||||
proto_config_add_boolean "gbp"
|
||||
proto_config_add_string "macaddr"
|
||||
|
||||
}
|
||||
|
||||
proto_vxlan_init_config() {
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsmasq
|
||||
PKG_VERSION:=2.82
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
|
||||
|
||||
@ -48,6 +48,7 @@ dnsmasq_ignore_opt() {
|
||||
echo "dnsmasq: \"$opt\" requested, but dnssec support is not available" >&2
|
||||
exit 1
|
||||
fi
|
||||
return 1
|
||||
;;
|
||||
tftp-*)
|
||||
[ -z "$dnsmasq_has_tftp" ] ;;
|
||||
@ -908,6 +909,7 @@ dnsmasq_start()
|
||||
append_parm "$cfg" "min_cache_ttl" "--min-cache-ttl"
|
||||
append_parm "$cfg" "max_cache_ttl" "--max-cache-ttl"
|
||||
append_parm "$cfg" "pxe_prompt" "--pxe-prompt"
|
||||
append_parm "$cfg" "tftp_unique_root" "--tftp-unique-root"
|
||||
config_list_foreach "$cfg" "pxe_service" append_pxe_service
|
||||
config_get DOMAIN "$cfg" domain
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ define Package/odhcpd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults/15_odhcpd
|
||||
endef
|
||||
|
||||
Package/odhcpd-ipv6only/install = $(Package/odhcpd/install)
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zram-swap
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=7
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
@ -17,7 +17,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/zram-swap
|
||||
SECTION:=utils
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+kmod-zram +!(BUSYBOX_CONFIG_MKSWAP&&BUSYBOX_CONFIG_SWAPON&&BUSYBOX_CONFIG_SWAPOFF):swap-utils
|
||||
DEPENDS:=+kmod-zram +@BUSYBOX_CONFIG_MKSWAP +@BUSYBOX_CONFIG_SWAPON +@BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD +@BUSYBOX_CONFIG_FEATURE_SWAPON_PRI +@BUSYBOX_CONFIG_SWAPOFF
|
||||
TITLE:=ZRAM swap scripts
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
@ -35,18 +35,18 @@ zram_applicable()
|
||||
return 1
|
||||
}
|
||||
|
||||
command -v mkswap >/dev/null || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'mkswap' not installed"
|
||||
[ -x /sbin/mkswap ] || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox mkswap' not installed"
|
||||
return 1
|
||||
}
|
||||
|
||||
command -v swapon >/dev/null || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'swapon' not installed"
|
||||
[ -x /sbin/swapon ] || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox swapon' not installed"
|
||||
return 1
|
||||
}
|
||||
|
||||
command -v swapoff >/dev/null || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'swapoff' not installed"
|
||||
[ -x /sbin/swapoff ] || {
|
||||
logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox swapoff' not installed"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
@ -181,8 +181,8 @@ start()
|
||||
zram_comp_algo "$zram_dev"
|
||||
zram_comp_streams "$zram_dev"
|
||||
echo $(( $zram_size * 1024 * 1024 )) >"/sys/block/$( basename "$zram_dev" )/disksize"
|
||||
mkswap "$zram_dev"
|
||||
swapon -d $zram_priority "$zram_dev"
|
||||
/sbin/mkswap "$zram_dev"
|
||||
/sbin/swapon -d $zram_priority "$zram_dev"
|
||||
}
|
||||
|
||||
stop()
|
||||
@ -191,7 +191,7 @@ stop()
|
||||
|
||||
for zram_dev in $( grep zram /proc/swaps |awk '{print $1}' ); do {
|
||||
logger -s -t zram_stop -p daemon.debug "deactivate swap $zram_dev"
|
||||
swapoff "$zram_dev" && zram_reset "$zram_dev" "claiming memory back"
|
||||
/sbin/swapoff "$zram_dev" && zram_reset "$zram_dev" "claiming memory back"
|
||||
local dev_index="$( echo $zram_dev | grep -o "[0-9]*$" )"
|
||||
if [ $dev_index -ne 0 ]; then
|
||||
logger -s -t zram_stop -p daemon.debug "removing zram $zram_dev"
|
||||
|
||||
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=policycoreutils
|
||||
PKG_VERSION:=3.1
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710
|
||||
@ -23,62 +23,129 @@ PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/policycoreutils
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:= +libsemanage +libcap-ng +BUSYBOX_CONFIG_PAM:libpam $(INTL_DEPENDS)
|
||||
TITLE:=SELinux policy utilities
|
||||
URL:=http://selinuxproject.org/page/Main_Page
|
||||
ALTERNATIVES:=\
|
||||
300:/sbin/restorecon:policycoreutils-restorecon \
|
||||
300:/sbin/setfiles:policycoreutils-setfiles \
|
||||
300:/usr/sbin/load_policy:policycoreutils-load_policy \
|
||||
300:/usr/sbin/sestatus:policycoreutils-sestatus \
|
||||
300:/usr/sbin/setsebool:policycoreutils-setsebool
|
||||
endef
|
||||
|
||||
define Package/policycoreutils/description
|
||||
Policycoreutils is a collection of policy utilities
|
||||
(originally the "core" set of utilities needed to use
|
||||
SELinux, although it has grown a bit over time), which have
|
||||
different dependencies. sestatus, secon, run_init, and
|
||||
newrole only use libselinux. load_policy and setfiles only
|
||||
use libselinux and libsepol. semodule and semanage use
|
||||
libsemanage (and thus bring in dependencies on libsepol and
|
||||
libselinux as well). setsebool uses libselinux to make
|
||||
non-persistent boolean changes (via the kernel interface)
|
||||
and uses libsemanage to make persistent boolean changes.
|
||||
endef
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_MAKE_FLAGS += \
|
||||
PAMH=$(CONFIG_BUSYBOX_CONFIG_PAM) \
|
||||
PREFIX=$(STAGING_DIR_HOSTPKG) \
|
||||
SBINDIR=$(STAGING_DIR_HOSTPKG)/sbin \
|
||||
ETCDIR=$(STAGING_DIR_HOSTPKG)/etc
|
||||
DIR_SBIN:= \
|
||||
restorecon \
|
||||
setfiles
|
||||
|
||||
DIR_USR_BIN:= \
|
||||
newrole \
|
||||
secon
|
||||
|
||||
DIR_USR_SBIN:= \
|
||||
load_policy \
|
||||
sestatus \
|
||||
setsebool
|
||||
|
||||
LIBEXEC_UTILS := \
|
||||
pp
|
||||
|
||||
SBIN_UTILS:= \
|
||||
restorecon_xattr \
|
||||
restorecon \
|
||||
setfiles
|
||||
|
||||
USR_BIN_UTILS:= \
|
||||
newrole \
|
||||
secon
|
||||
|
||||
USR_SBIN_UTILS:= \
|
||||
fixfiles \
|
||||
genhomedircon \
|
||||
open_init_pty \
|
||||
run_init \
|
||||
semodule \
|
||||
load_policy \
|
||||
sestatus \
|
||||
setsebool
|
||||
|
||||
TARGET_LDFLAGS += $(INTL_LDFLAGS) $(if $(INTL_FULL),-lintl)
|
||||
|
||||
MAKE_FLAGS += \
|
||||
PAMH=$(CONFIG_BUSYBOX_CONFIG_PAM)
|
||||
|
||||
define Package/policycoreutils/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/restorecon_xattr $(1)/sbin/restorecon_xattr
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/restorecon $(1)/sbin/policycoreutils-restorecon
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/setfiles $(1)/sbin/policycoreutils-setfiles
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fixfiles $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/genhomedircon $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/open_init_pty $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/run_init $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/semodule $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/load_policy $(1)/usr/sbin/policycoreutils-load_policy
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sestatus $(1)/usr/sbin/policycoreutils-sestatus
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setsebool $(1)/usr/sbin/policycoreutils-setsebool
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
||||
HOST_MAKE_FLAGS += \
|
||||
PAMH=$(CONFIG_BUSYBOX_CONFIG_PAM) \
|
||||
DESTDIR=$(STAGING_DIR_HOSTPKG) \
|
||||
PREFIX= \
|
||||
SBINDIR=/bin
|
||||
|
||||
HOST_LDFLAGS += -Wl,-rpath=$(STAGING_DIR_HOSTPKG)/lib
|
||||
|
||||
$(eval $(foreach a,$(DIR_SBIN),ALTS_$(a):=300:/sbin/$(a):/sbin/policycoreutils-$(a)$(newline)))
|
||||
$(eval $(foreach a,$(DIR_USR_BIN),ALTS_$(a):=300:/usr/bin/$(a):/usr/bin/policycoreutils-$(a)$(newline)))
|
||||
$(eval $(foreach a,$(DIR_USR_SBIN),ALTS_$(a):=300:/usr/sbin/$(a):/usr/sbin/policycoreutils-$(a)$(newline)))
|
||||
|
||||
DEPENDS_genhomedircon:=+libsemanage $(INTL_DEPENDS)
|
||||
DEPENDS_load_policy:=+libselinux $(INTL_DEPENDS)
|
||||
DEPENDS_newrole:=+libselinux +libaudit +BUSYBOX_CONFIG_PAM:libpam $(INTL_DEPENDS)
|
||||
DEPENDS_open_init_pty:=$(INTL_DEPENDS)
|
||||
DEPENDS_pp:=+libsepol $(INTL_DEPENDS)
|
||||
DEPENDS_restorecon_xattr:=+libselinux +libsepol +libaudit $(INTL_DEPENDS)
|
||||
DEPENDS_restorecon:=+libselinux +libsepol +libaudit $(INTL_DEPENDS)
|
||||
DEPENDS_run_init:=+libselinux +libaudit +BUSYBOX_CONFIG_PAM:libpam $(INTL_DEPENDS)
|
||||
DEPENDS_secon:=+libselinux $(INTL_DEPENDS)
|
||||
DEPENDS_semanage:=+libsemanage
|
||||
DEPENDS_semodule:=+libsemanage $(INTL_DEPENDS)
|
||||
DEPENDS_sestatus:=+libselinux $(INTL_DEPENDS)
|
||||
DEPENDS_setfiles:=+libselinux +libsepol +libaudit $(INTL_DEPENDS)
|
||||
DEPENDS_setsebool:=+libsemanage $(INTL_DEPENDS)
|
||||
|
||||
define Package/policycoreutils/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=SELinux policy utility
|
||||
URL:=http://selinuxproject.org/page/Main_Page
|
||||
endef
|
||||
|
||||
define Package/policycoreutils
|
||||
$(call Package/policycoreutils/Default)
|
||||
MENU:=1
|
||||
TITLE+= common files
|
||||
endef
|
||||
|
||||
define GenUtilPkg
|
||||
define Package/$(1)
|
||||
$(call Package/policycoreutils/Default)
|
||||
DEPENDS+= policycoreutils $(DEPENDS_$(2))
|
||||
TITLE+= $(2)
|
||||
ALTERNATIVES:=$(ALTS_$(2))
|
||||
endef
|
||||
|
||||
define Package/$(1)/description
|
||||
Policycoreutils is a collection of policy utilities
|
||||
(originally the "core" set of utilities needed to use
|
||||
SELinux, although it has grown a bit over time).
|
||||
|
||||
This package provides the $(2) utility.
|
||||
endef
|
||||
endef
|
||||
|
||||
$(foreach a,$(LIBEXEC_UTILS) $(SBIN_UTILS) $(USR_BIN_UTILS) $(USR_SBIN_UTILS),$(eval $(call GenUtilPkg,policycoreutils-$(a),$(a))))
|
||||
|
||||
define Package/policycoreutils/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sestatus.conf $(1)/etc
|
||||
ifdef CONFIG_BUSYBOX_CONFIG_PAM
|
||||
$(INSTALL_DIR) $(1)/etc/pam.d
|
||||
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/pam.d/run_init $(1)/etc/pam.d
|
||||
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/pam.d/newrole $(1)/etc/pam.d
|
||||
endif
|
||||
endef
|
||||
|
||||
define BuildUtil
|
||||
define Package/$(1)/install
|
||||
$(INSTALL_DIR) $$(1)$(2)
|
||||
$(INSTALL_BIN) $$(PKG_INSTALL_DIR)$(2)/$(3) $$(1)$(2)/$(if $(ALTS_$(3)),policycoreutils-$(3),$(3))
|
||||
endef
|
||||
|
||||
$$(eval $$(call BuildPackage,$(1)))
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,policycoreutils))
|
||||
$(foreach a,$(SBIN_UTILS),$(eval $(call BuildUtil,policycoreutils-$(a),/sbin,$(a))))
|
||||
$(foreach a,$(USR_BIN_UTILS),$(eval $(call BuildUtil,policycoreutils-$(a),/usr/bin,$(a))))
|
||||
$(foreach a,$(USR_SBIN_UTILS),$(eval $(call BuildUtil,policycoreutils-$(a),/usr/sbin,$(a))))
|
||||
$(foreach a,$(LIBEXEC_UTILS),$(eval $(call BuildUtil,policycoreutils-$(a),/usr/libexec/selinux/hll,$(a))))
|
||||
$(eval $(call HostBuild))
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
usage() {
|
||||
printf "Usage: %s -A arch -C comp -a addr -e entry" "$(basename "$0")"
|
||||
printf " -v version -k kernel [-D name -d dtb] -o its_file"
|
||||
printf " -v version -k kernel [-D name -n address -d dtb] -o its_file"
|
||||
|
||||
printf "\n\t-A ==> set architecture to 'arch'"
|
||||
printf "\n\t-C ==> set compression type 'comp'"
|
||||
@ -26,12 +26,15 @@ usage() {
|
||||
printf "\n\t-v ==> set kernel version to 'version'"
|
||||
printf "\n\t-k ==> include kernel image 'kernel'"
|
||||
printf "\n\t-D ==> human friendly Device Tree Blob 'name'"
|
||||
printf "\n\t-n ==> fdt unit-address 'address'"
|
||||
printf "\n\t-d ==> include Device Tree Blob 'dtb'"
|
||||
printf "\n\t-o ==> create output file 'its_file'\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while getopts ":A:a:c:C:D:d:e:k:o:v:" OPTION
|
||||
FDTNUM=1
|
||||
|
||||
while getopts ":A:a:c:C:D:d:e:k:n:o:v:" OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
A ) ARCH=$OPTARG;;
|
||||
@ -42,6 +45,7 @@ do
|
||||
d ) DTB=$OPTARG;;
|
||||
e ) ENTRY_ADDR=$OPTARG;;
|
||||
k ) KERNEL=$OPTARG;;
|
||||
n ) FDTNUM=$OPTARG;;
|
||||
o ) OUTPUT=$OPTARG;;
|
||||
v ) VERSION=$OPTARG;;
|
||||
* ) echo "Invalid option passed to '$0' (options:$*)"
|
||||
@ -61,7 +65,7 @@ ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
|
||||
# Conditionally create fdt information
|
||||
if [ -n "${DTB}" ]; then
|
||||
FDT_NODE="
|
||||
fdt@1 {
|
||||
fdt@$FDTNUM {
|
||||
description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\";
|
||||
data = /incbin/(\"${DTB}\");
|
||||
type = \"flat_dt\";
|
||||
@ -75,7 +79,7 @@ if [ -n "${DTB}" ]; then
|
||||
};
|
||||
};
|
||||
"
|
||||
FDT_PROP="fdt = \"fdt@1\";"
|
||||
FDT_PROP="fdt = \"fdt@$FDTNUM\";"
|
||||
fi
|
||||
|
||||
# Create a default, fully populated DTS file
|
||||
|
||||
@ -20,6 +20,7 @@ sub target_config_features(@) {
|
||||
/^usb$/ and $ret .= "\tselect USB_SUPPORT\n";
|
||||
/^usbgadget$/ and $ret .= "\tselect USB_GADGET_SUPPORT\n";
|
||||
/^pcmcia$/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
|
||||
/^pwm$/ and $ret .= "\select PWM_SUPPORT\n";
|
||||
/^rtc$/ and $ret .= "\tselect RTC_SUPPORT\n";
|
||||
/^squashfs$/ and $ret .= "\tselect USES_SQUASHFS\n";
|
||||
/^jffs2$/ and $ret .= "\tselect USES_JFFS2\n";
|
||||
|
||||
@ -29,6 +29,9 @@ config PCIE_SUPPORT
|
||||
config PCMCIA_SUPPORT
|
||||
bool
|
||||
|
||||
config PWM_SUPPORT
|
||||
bool
|
||||
|
||||
config USB_SUPPORT
|
||||
select AUDIO_SUPPORT
|
||||
bool
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += IMAGE_SIZE DTB_SIZE
|
||||
DEVICE_VARS += DTB_SIZE
|
||||
|
||||
define Build/boot-img
|
||||
$(RM) -rf $@.bootdir
|
||||
|
||||
@ -223,7 +223,7 @@
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
spidev1: spi@1 {
|
||||
spidev1: spi@0 {
|
||||
compatible = "siliconlabs,si3210";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
@ -52,7 +52,7 @@ define Build/fullimage
|
||||
rm $@.tmp
|
||||
endef
|
||||
|
||||
DEVICE_VARS += IMAGE_SIZE SIGNATURE MAGIC CRC32_POLY
|
||||
DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY
|
||||
DTS_DIR := $(DTS_DIR)/lantiq
|
||||
|
||||
# Shared device definition: applies to every defined device
|
||||
@ -63,7 +63,6 @@ define Device/Default
|
||||
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGE_SIZE :=
|
||||
SOC := $(DEFAULT_SOC)
|
||||
DEVICE_DTS = $$(SOC)_$(1)
|
||||
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
|
||||
|
||||
@ -941,7 +941,7 @@ define Device/thunder_timecloud
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_VENDOR := Thunder
|
||||
DEVICE_MODEL := Timecloud
|
||||
DEVICE_PACKAGES := kmod-usb3 -wpad-openssl
|
||||
DEVICE_PACKAGES := kmod-usb3 -wpad-openssl kmod-sdhci-mt7620
|
||||
SUPPORTED_DEVICES += timecloud
|
||||
endef
|
||||
TARGET_DEVICES += thunder_timecloud
|
||||
|
||||
Loading…
Reference in New Issue
Block a user