Skip to content

Commit

Permalink
openclash/mosdns update with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryLip committed Dec 2, 2024
2 parents ec86f18 + dbb4a11 commit 2402646
Show file tree
Hide file tree
Showing 214 changed files with 10,623 additions and 1,463 deletions.
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@
- changed-files:
- any-glob-to-any-file:
- "target/linux/starfive/**"
"target/stm32":
- changed-files:
- any-glob-to-any-file:
- "target/linux/stm32/**"
- "package/boot/arm-trusted-firmware-stm32/**"
- "package/boot/optee-os-stm32/**"
- "package/boot/uboot-stm32/**"
"target/sunxi":
- changed-files:
- any-glob-to-any-file:
Expand Down
5 changes: 2 additions & 3 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ menu "Global build settings"

config USE_APK
imply PACKAGE_apk-mbedtls
bool "Use APK instead of OPKG to build distribution (EXPERIMENTAL)"
bool "Use APK instead of OPKG to build distribution"
default y

comment "General build options"
Expand Down Expand Up @@ -423,10 +423,9 @@ menu "Global build settings"

endchoice

config SECCOMP
config USE_SECCOMP
bool "Enable SECCOMP"
select KERNEL_SECCOMP
select PACKAGE_procd-seccomp
depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || powerpc || x86_64)
depends on !TARGET_uml
default y
Expand Down
1 change: 0 additions & 1 deletion config/Config-ipq.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ choice KERNEL_IPQ_MEM_PROFILE
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_compex_wpq87
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4200v1
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_redmi_ax6
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_redmi_ax6-stock
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_xiaomi_ax3600
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_zte_mf269

Expand Down
19 changes: 19 additions & 0 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,25 @@ if KERNEL_TASKSTATS

endif

config KERNEL_PSI
bool "Compile the kernel with pressure stall information tracking"
help
Collect metrics that indicate how overcommitted the CPU, memory,
and IO capacity are in the system.

If you say Y here, the kernel will create /proc/pressure/ with the
pressure statistics files cpu, memory, and io. These will indicate
the share of walltime in which some or all tasks in the system are
delayed due to contention of the respective resource.

In kernels with cgroup support, cgroups (cgroup2 only) will
have cpu.pressure, memory.pressure, and io.pressure files,
which aggregate pressure stalls for the grouped tasks only.

For more details see Documentation/accounting/psi.rst.

Say N if unsure.

config KERNEL_KALLSYMS
bool "Compile the kernel with symbol table information"
default y if !SMALL_FLASH
Expand Down
4 changes: 4 additions & 0 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,10 @@ define Build/zip
rm -rf $@.tmp
endef

define Build/zyimage
$(STAGING_DIR_HOST)/bin/zyimage $(1) $@
endef

define Build/zyxel-ras-image
let \
newsize="$(call exp_units,$(RAS_ROOTFS_SIZE))"; \
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .61
LINUX_KERNEL_HASH-6.6.61 = 418fc24df9190f1c3ed9906dc3b7651c2a2eae5c1cb9ab4a6348e20faf047c0b
LINUX_VERSION-6.6 = .63
LINUX_KERNEL_HASH-6.6.63 = d1054ab4803413efe2850f50f1a84349c091631ec50a1cf9e891d1b1f9061835
4 changes: 2 additions & 2 deletions include/meson.mk
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ define Host/Configure/Meson
endef

define Host/Compile/Meson
+$(NINJA) -C $(MESON_HOST_BUILD_DIR) $(1)
+$(MESON_HOST_VARS) $(NINJA) -C $(MESON_HOST_BUILD_DIR) $(1)
endef

define Host/Install/Meson
Expand All @@ -135,7 +135,7 @@ define Build/Configure/Meson
endef

define Build/Compile/Meson
+$(NINJA) -C $(MESON_BUILD_DIR) $(1)
+$(MESON_VARS) $(NINJA) -C $(MESON_BUILD_DIR) $(1)
endef

define Build/Install/Meson
Expand Down
113 changes: 113 additions & 0 deletions include/optee-os.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
include $(INCLUDE_DIR)/prereq.mk

PKG_NAME ?= optee-os

ifndef PKG_SOURCE_PROTO
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL = https://github.com/OP-TEE/optee_os/archive/refs/tags/
TAR_OPTIONS+= --transform 's/optee_os/$(PKG_NAME)/'
endif

PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)

PKG_TARGETS := bin
PKG_FLAGS:=nonshared

PKG_LICENSE:=BSD 2-Clause
PKG_LICENSE_FILES:=LICENSE

PKG_BUILD_PARALLEL ?= 1

$(eval $(call TestHostCommand,python3-cryptography, \
Please install the Python3 cryptography module, \
$(STAGING_DIR_HOST)/bin/python3 -c 'import cryptography'))

$(eval $(call TestHostCommand,python3-pyelftools, \
Please install the Python3 pyelftools module, \
$(STAGING_DIR_HOST)/bin/python3 -c 'import elftools'))

export GCC_HONOUR_COPTS=s

define Package/optee-os/install/default
$(CP) $(patsubst %,$(PKG_BUILD_DIR)/out/arm-plat-$(PLAT)/core/%,$(OPTEE_IMAGE)) $(1)/
endef

Package/optee-os/install = $(Package/optee-os/install/default)

define Optee-os/Init
BUILD_TARGET:=
BUILD_SUBTARGET:=
BUILD_DEVICES:=
NAME:=
DEPENDS:=
HIDDEN:=
DEFAULT:=
VARIANT:=$(1)
PLAT:=$(1)
PLAT_FLAVOR:=
OPTEE_IMAGE:=tee-header_v2.bin tee-pager_v2.bin tee-pageable_v2.bin
endef

TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))

define Build/Optee-os/Target
$(eval $(call Optee-os/Init,$(1)))
$(eval $(call Optee-os/Default,$(1)))
$(eval $(call Optee-os/$(1),$(1)))

define Package/optee-os-$(1)
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=OPTEE-OS for $(NAME)
VARIANT:=$(VARIANT)
DEPENDS:=@!IN_SDK $(DEPENDS)
HIDDEN:=$(HIDDEN)
ifneq ($(BUILD_TARGET),)
DEPENDS += @$(TARGET_DEP)
ifneq ($(BUILD_DEVICES),)
DEFAULT := y if ($(TARGET_DEP)_Default \
$(patsubst %,|| $(TARGET_DEP)_DEVICE_%,$(BUILD_DEVICES)) \
$(patsubst %,|| $(patsubst TARGET_%,TARGET_DEVICE_%,$(TARGET_DEP))_DEVICE_%,$(BUILD_DEVICES)))
endif
endif
$(if $(DEFAULT),DEFAULT:=$(DEFAULT))
URL:=https://optee.readthedocs.io
endef

define Package/optee-os-$(1)/install
$$(Package/optee-os/install)
endef
endef

define Build/Configure/Optee-os
endef

define Build/Compile/Optee-os
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
PATH=$(LINUX_DIR)/scripts/dtc/:$(PATH) \
CROSS_COMPILE=$(TARGET_CROSS) \
CROSS_COMPILE_core="$(TARGET_CROSS)" \
CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \
CROSS_COMPILE_ta_arm32="$(TARGET_CROSS)" \
$(if $(CONFIG_ARCH_64BIT), CFG_ARM64_core=y CFG_USER_TA_TARGETS=ta_arm64, CFG_ARM32_core=y) \
PLATFORM="$(PLAT)" \
PLATFORM_FLAVOR="$(call qstrip,$(PLAT_FLAVOR))" \
$(OPTEE_MAKE_FLAGS)
endef

define BuildPackage/Optee-os/Defaults
Build/Configure/Default = $$$$(Build/Configure/Optee-os)
Build/Compile/Default = $$$$(Build/Compile/Optee-os)
endef

define BuildPackage/Optee-os
$(eval $(call BuildPackage/Optee-os/Defaults))
$(foreach type,$(if $(DUMP),$(OPTEE_TARGETS),$(BUILD_VARIANT)), \
$(eval $(call Build/Optee-os/Target,$(type)))
)
$(eval $(call Build/DefaultTargets))
$(foreach type,$(if $(DUMP),$(OPTEE_TARGETS),$(BUILD_VARIANT)), \
$(call BuildPackage,optee-os-$(type))
)
endef
18 changes: 12 additions & 6 deletions include/package-pack.mk
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ endif
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
ADIR_$(1):=$(PKG_BUILD_DIR)/apk-$(PKGARCH)/$(1)
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
APK_SCRIPTS_$(1):=\
--script "post-install:$$(ADIR_$(1))/post-install" \
--script "pre-deinstall:$$(ADIR_$(1))/pre-deinstall"

ifdef Package/$(1)/postrm
APK_SCRIPTS_$(1)+=--script "post-deinstall:$$(ADIR_$(1))/postrm"
endif

TARGET_VARIANT:=$$(if $(ALL_VARIANTS),$$(if $$(VARIANT),$$(filter-out *,$$(VARIANT)),$(firstword $(ALL_VARIANTS))))
ifeq ($(BUILD_VARIANT),$$(if $$(TARGET_VARIANT),$$(TARGET_VARIANT),$(BUILD_VARIANT)))
Expand Down Expand Up @@ -294,8 +301,8 @@ else
echo 'export root="$$$${IPKG_INSTROOT}"'; \
echo 'export pkgname="$(1)"'; \
echo "add_group_and_user"; \
[ ! -f $$(ADIR_$(1))/postinst-pkg ] || cat "$$(ADIR_$(1))/postinst-pkg"; \
echo "default_postinst"; \
[ ! -f $$(ADIR_$(1))/postinst-pkg ] || cat "$$(ADIR_$(1))/postinst-pkg"; \
) > $$(ADIR_$(1))/post-install;

( \
Expand All @@ -304,8 +311,8 @@ else
echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
echo 'export root="$$$${IPKG_INSTROOT}"'; \
echo 'export pkgname="$(1)"'; \
[ ! -f $$(ADIR_$(1))/prerm-pkg ] || cat "$$(ADIR_$(1))/prerm-pkg"; \
echo "default_prerm"; \
[ ! -f $$(ADIR_$(1))/prerm-pkg ] || cat "$$(ADIR_$(1))/prerm-pkg"; \
) > $$(ADIR_$(1))/pre-deinstall;

if [ -n "$(USERID)" ]; then echo $(USERID) > $$(IDIR_$(1))/lib/apk/packages/$(1).rusers; fi;
Expand Down Expand Up @@ -344,7 +351,7 @@ else
--info "name:$(1)$$(ABIV_$(1))" \
--info "version:$(VERSION)" \
--info "description:$$(call description_escape,$$(strip $$(Package/$(1)/description)))" \
--info "arch:$(PKGARCH)" \
$(if $(findstring all,$(PKGARCH)),--info "arch:noarch",--info "arch:$(PKGARCH)") \
--info "license:$(LICENSE)" \
--info "origin:$(SOURCE)" \
--info "url:$(URL)" \
Expand All @@ -359,9 +366,8 @@ else
) \
), \
$$(prov) )" \
$(if $(DEFAULT_VARIANT),--info "provider-priority:100") \
--script "post-install:$$(ADIR_$(1))/post-install" \
--script "pre-deinstall:$$(ADIR_$(1))/pre-deinstall" \
$(if $(DEFAULT_VARIANT),--info "provider-priority:100",$(if $(PROVIDES),--info "provider-priority:1")) \
$$(APK_SCRIPTS_$(1)) \
--info "depends:$$(foreach depends,$$(subst $$(comma),$$(space),$$(subst $$(space),,$$(subst $$(paren_right),,$$(subst $$(paren_left),,$$(Package/$(1)/DEPENDS))))),$$(depends))" \
--files "$$(IDIR_$(1))" \
--output "$$(PACK_$(1))" \
Expand Down
5 changes: 5 additions & 0 deletions include/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ else
endif
endif

# include ujail on systems with enough storage
ifeq ($(filter small_flash,$(FEATURES)),)
DEFAULT_PACKAGES+=procd-ujail
endif

# Add device specific packages (here below to allow device type set from subtarget)
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))

Expand Down
2 changes: 1 addition & 1 deletion include/toplevel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ _ignore = $(foreach p,$(IGNORE_PACKAGES),--ignore $(p))
# Config that will invalidate the .targetinfo as they will affect
# DEFAULT_PACKAGES.
# Keep DYNAMIC_DEF_PKG_CONF in sync with target.mk to reflect the same configs
DYNAMIC_DEF_PKG_CONF := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_SECCOMP
DYNAMIC_DEF_PKG_CONF := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_USE_SECCOMP
check-dynamic-def-pkg: FORCE
@+DEF_PKG_CONFS=""; \
if [ -f $(TOPDIR)/.config ]; then \
Expand Down
78 changes: 39 additions & 39 deletions luci feed mod/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,44 +159,44 @@ return view.extend({
* Logging
*/

o = s.taboption('logging', form.Value, 'log_size', _('System log buffer size'), "kiB")
o.optional = true
o.placeholder = 16
o.datatype = 'uinteger'

o = s.taboption('logging', form.Value, 'log_ip', _('External system log server'))
o.optional = true
o.placeholder = '0.0.0.0'
o.datatype = 'host'

o = s.taboption('logging', form.Value, 'log_port', _('External system log server port'))
o.optional = true
o.placeholder = 514
o.datatype = 'port'

o = s.taboption('logging', form.ListValue, 'log_proto', _('External system log server protocol'))
o.value('udp', 'UDP')
o.value('tcp', 'TCP')

o = s.taboption('logging', form.Value, 'log_file', _('Write system log to file'))
o.optional = true
o.placeholder = '/tmp/system.log'

o = s.taboption('logging', form.ListValue, 'conloglevel', _('Log output level'))
o.value(8, _('Debug'))
o.value(7, _('Info'))
o.value(6, _('Notice'))
o.value(5, _('Warning'))
o.value(4, _('Error'))
o.value(3, _('Critical'))
o.value(2, _('Alert'))
o.value(1, _('Emergency'))

o = s.taboption('logging', form.ListValue, 'cronloglevel', _('Cron Log Level'))
o.default = 8
o.value(5, _('Debug'))
o.value(8, _('Normal'))
o.value(9, _('Warning'))
o = s.taboption('logging', form.Value, 'log_size', _('System log buffer size'), "kiB");
o.optional = true;
o.placeholder = 128;
o.datatype = 'uinteger';

o = s.taboption('logging', form.Value, 'log_ip', _('External system log server'));
o.optional = true;
o.placeholder = '0.0.0.0';
o.datatype = 'host';

o = s.taboption('logging', form.Value, 'log_port', _('External system log server port'));
o.optional = true;
o.placeholder = 514;
o.datatype = 'port';

o = s.taboption('logging', form.ListValue, 'log_proto', _('External system log server protocol'));
o.value('udp', 'UDP');
o.value('tcp', 'TCP');

o = s.taboption('logging', form.Value, 'log_file', _('Write system log to file'));
o.optional = true;
o.placeholder = '/tmp/system.log';

o = s.taboption('logging', form.ListValue, 'conloglevel', _('Log output level'), _('Only affects dmesg kernel log'));
o.value(8, _('Debug'));
o.value(7, _('Info'));
o.value(6, _('Notice'));
o.value(5, _('Warning'));
o.value(4, _('Error'));
o.value(3, _('Critical'));
o.value(2, _('Alert'));
o.value(1, _('Emergency'));

o = s.taboption('logging', form.ListValue, 'cronloglevel', _('Cron Log Level'));
o.default = 7;
o.value(7, _('Normal'));
o.value(9, _('Disabled'));
o.value(5, _('Debug'));

/*
* Zram Properties
Expand All @@ -212,7 +212,7 @@ return view.extend({

o = s.taboption('zram', form.ListValue, 'zram_comp_algo', _('ZRam Compression Algorithm'));
o.optional = true;
o.default = 'lz4hc';
o.default = 'lzo';
o.value('lzo', 'lzo');
o.value('lzo-rle', 'lzo-rle');
o.value('lz4', 'lz4');
Expand Down
Loading

0 comments on commit 2402646

Please sign in to comment.