Skip to content

Commit

Permalink
Merge remote-tracking branch 'op/main'
Browse files Browse the repository at this point in the history
This is my last update, maybe another developer will maintain it in the future.
  • Loading branch information
breeze303 committed Nov 12, 2024
2 parents 85a4ead + be3e7a8 commit d035751
Show file tree
Hide file tree
Showing 80 changed files with 458 additions and 248 deletions.
19 changes: 19 additions & 0 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ menu "Global build settings"
config USE_APK
imply PACKAGE_apk-mbedtls
bool "Use APK instead of OPKG to build distribution (EXPERIMENTAL)"
default y

comment "General build options"

Expand Down Expand Up @@ -295,12 +296,22 @@ menu "Global build settings"
Enable GCC Stack Smashing Protection (SSP) for userspace applications
config PKG_CC_STACKPROTECTOR_NONE
bool "None"
help
No stack smashing protection.
config PKG_CC_STACKPROTECTOR_REGULAR
bool "Regular"
help
Protects functions with vulnerable objects.
This includes functions with buffers larger than 8 bytes or calls to alloca.
config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong"
help
Like Regular, but also protects functions with
local arrays or references to local frame addresses.
config PKG_CC_STACKPROTECTOR_ALL
bool "All"
help
Protects all functions.
endchoice

choice
Expand All @@ -310,10 +321,18 @@ menu "Global build settings"
Enable GCC Stack-Smashing Protection (SSP) for the kernel
config KERNEL_CC_STACKPROTECTOR_NONE
bool "None"
help
No stack smashing protection.
config KERNEL_CC_STACKPROTECTOR_REGULAR
bool "Regular"
help
Protects functions with vulnerable objects.
This includes functions with buffers larger than 8 bytes or calls to alloca.
config KERNEL_CC_STACKPROTECTOR_STRONG
bool "Strong"
help
Like Regular, but also protects functions with
local arrays or references to local frame addresses.
endchoice

config KERNEL_STACKPROTECTOR
Expand Down
2 changes: 1 addition & 1 deletion include/cmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ define Build/Configure/Default
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_VERSION=1 \
-DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=$(if $(CONFIG_DEBUG),Debug,Release) \
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \
Expand Down
2 changes: 1 addition & 1 deletion include/meson.mk
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ define Build/Configure/Meson
$(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt)
$(call Meson, \
setup \
--buildtype plain \
--buildtype $(if $(CONFIG_DEBUG),debug,plain) \
--native-file $(PKG_BUILD_DIR)/openwrt-native.txt \
--cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \
-Ddefault_library=both \
Expand Down
3 changes: 1 addition & 2 deletions include/rootfs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ apk = \
$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk \
--root $(1) \
--keys-dir $(if $(APK_KEYS),$(APK_KEYS),$(TOPDIR)) \
--no-cache \
--no-logfile \
--preserve-env

Expand Down Expand Up @@ -84,7 +83,7 @@ define prepare_rootfs
IPKG_POSTINST_PATH=./usr/lib/opkg/info/*.postinst; \
fi; \
for script in $$IPKG_POSTINST_PATH; do \
PATH="$(TARGET_PATH_PKG)" IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \
IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \
ret=$$?; \
if [ $$ret -ne 0 ]; then \
echo "postinst script $$script has failed with exit code $$ret" >&2; \
Expand Down
40 changes: 2 additions & 38 deletions include/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,45 +78,9 @@ else
endif
endif

ifneq ($(DUMP),)
# Parse generic config that might be set before a .config is generated to modify the
# default package configuration
# Keep DYNAMIC_DEF_PKG_CONF in sync with toplevel.mk to reflect the same configs
DYNAMIC_DEF_PKG_CONF := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_SECCOMP
$(foreach config, $(DYNAMIC_DEF_PKG_CONF), \
$(eval $(config) := $(shell grep "$(config)=y" $(TOPDIR)/.config 2>/dev/null)) \
)
# The config options that are enabled by default and where other default
# packages depends on needs to be set if they are missing in the .config.
ifeq ($(shell grep "CONFIG_SECCOMP" $(TOPDIR)/.config 2>/dev/null),)
ifeq ($(filter $(BOARD), uml),)
ifneq ($(filter $(ARCH), aarch64 arm armeb mips mipsel mips64 mips64el i386 powerpc x86_64),)
CONFIG_SECCOMP := y
endif
endif
endif
endif

ifneq ($(CONFIG_USE_APK),)
DEFAULT_PACKAGES+=apk-mbedtls
else
DEFAULT_PACKAGES+=opkg
endif

ifneq ($(CONFIG_SELINUX),)
DEFAULT_PACKAGES+=busybox-selinux procd-selinux
else
DEFAULT_PACKAGES+=busybox procd
endif

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

# include seccomp ld-preload hooks if kernel supports it
ifneq ($(CONFIG_SECCOMP),)
DEFAULT_PACKAGES+=procd-seccomp
ifeq ($(filter small_flash,$(FEATURES)),)
DEFAULT_PACKAGES+=procd-ujail
endif

# Add device specific packages (here below to allow device type set from subtarget)
Expand Down
4 changes: 2 additions & 2 deletions package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(curdir)/merge-index
ifneq ($(CONFIG_USE_APK),)
$(file >$(TMP_DIR)/apk_install_list,\
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
$(call apk,$(TARGET_DIR)) add --initdb --no-scripts --arch $(ARCH_PACKAGES) \
$(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
$$(cat $(TMP_DIR)/apk_install_list)
else
Expand Down Expand Up @@ -130,7 +130,7 @@ ifneq ($(CONFIG_USE_APK),)
--keys-dir $(TOPDIR) \
--sign $(BUILD_KEY_APK_SEC) \
--output packages.adb \
$$(ls *.apk | grep -v 'kernel\|libc'); \
$$(ls *.apk | grep -v 'base-files-\|kernel-\|libc-'); \
done
else
@for d in $(PACKAGE_SUBDIRS); do ( \
Expand Down
1 change: 1 addition & 0 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ ifneq ($(CONFIG_USE_APK),)
$(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories

rm -f $(1)/etc/uci-defaults/13_fix-group-user
rm -f $(1)/sbin/pkg_check
else
$(if $(CONFIG_CLEAN_IPKG),, \
mkdir -p $(1)/etc/opkg; \
Expand Down
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/ath79
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ ruckus,zf7372)
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000"
;;
sophos,ap15|\
sophos,ap15c|\
sophos,ap55|\
sophos,ap55c|\
sophos,ap100|\
Expand Down
4 changes: 2 additions & 2 deletions package/devel/gdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=gdb
PKG_VERSION:=15.2
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gdb
Expand Down Expand Up @@ -37,7 +37,7 @@ $(call Package/gdb/Default)
endef

define Package/gdb/description
GDB, the GNU Project debugger, allows you to see what is going on `inside'
GDB, the GNU Project debugger, allows you to see what is going on 'inside'
another program while it executes -- or what another program was doing at the
moment it crashed.
endef
Expand Down
2 changes: 0 additions & 2 deletions package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ static struct platform_driver gpio_keys_driver = {
.remove = gpio_keys_remove,
.driver = {
.name = "gpio-keys",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(gpio_keys_of_match),
},
};
Expand All @@ -703,7 +702,6 @@ static struct platform_driver gpio_keys_polled_driver = {
.remove = gpio_keys_remove,
.driver = {
.name = "gpio-keys-polled",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(gpio_keys_polled_of_match),
},
};
Expand Down
1 change: 0 additions & 1 deletion package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ nct5104d_gpio_device_add(const struct nct5104d_sio *sio)

static struct platform_driver nct5104d_gpio_driver = {
.driver = {
.owner = THIS_MODULE,
.name = DRVNAME,
},
.probe = nct5104d_gpio_probe,
Expand Down
1 change: 0 additions & 1 deletion package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,6 @@ static struct platform_driver ltq_mei_driver = {
.remove = ltq_mei_remove,
.driver = {
.name = "lantiq,mei-xway",
.owner = THIS_MODULE,
.of_match_table = ltq_mei_match,
},
};
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/lantiq/ltq-adsl/patches/120-platform.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}

#ifndef _lint
@@ -1159,8 +1159,30 @@ module_param(debug_level, byte, 0);
@@ -1159,8 +1159,29 @@ module_param(debug_level, byte, 0);
MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs");
#endif /* #ifndef DSL_DEBUG_DISABLE*/

Expand All @@ -59,7 +59,6 @@
+ .remove = __devexit_p(ltq_adsl_remove),
+ .driver = {
+ .name = "adsl",
+ .owner = THIS_MODULE,
+ .of_match_table = ltq_adsl_match,
+ },
+};
Expand Down
1 change: 0 additions & 1 deletion package/kernel/lantiq/ltq-atm/src/ltq_atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,6 @@ static struct platform_driver ltq_atm_driver = {
.remove = ltq_atm_remove,
.driver = {
.name = "atm",
.owner = THIS_MODULE,
.of_match_table = ltq_atm_match,
},
};
Expand Down
1 change: 0 additions & 1 deletion package/kernel/lantiq/ltq-deu/src/ifxmips_deu.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ static struct platform_driver ltq_deu_driver = {
.remove = ltq_deu_remove,
.driver = {
.name = "deu",
.owner = THIS_MODULE,
.of_match_table = ltq_deu_match,
},
};
Expand Down
1 change: 0 additions & 1 deletion package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,6 @@ static struct platform_driver ltq_ptm_driver = {
.remove = ltq_ptm_remove,
.driver = {
.name = "ptm",
.owner = THIS_MODULE,
.of_match_table = ltq_ptm_match,
},
};
Expand Down
1 change: 0 additions & 1 deletion package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,6 @@ static struct platform_driver ltq_ptm_driver = {
.remove = ltq_ptm_remove,
.driver = {
.name = "ptm",
.owner = THIS_MODULE,
.of_match_table = ltq_ptm_match,
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 3983dc1674fec43beb8ce9d9bfdd6302fef86eae Mon Sep 17 00:00:00 2001
From: Andrew MacIntyre <[email protected]>
Date: Mon, 4 Nov 2024 22:41:25 +1100
Subject: [PATCH] vrx518_tc: allow larger MTU to support RFC4638

vrx518_tc currently sets the interface maximum MTU to the ethernet default
of 1500 bytes by default via ether_setup() called from ptm_setup().

To support 1508 byte baby jumbo frames (RFC4638) for PPPoE connections
over VDSL links as already supported by the VR9 ltq_ptm driver ([1], [2])
set the interface maximum MTU to MAX_MTU.

MAX_MTU is defined in dcdp/inc/tc_common.h to 2002 bytes and this value is
used in ptm_change_mtu() and elsewhere as the maximum MTU, however this is
short circuited by checks against the interface maximum MTU.

[1]: https://forum.openwrt.org/t/fritzbox-7530-and-rfc4638-baby-jumbo-frames/181327
[2]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=8a2a20e71e2909f84dab47e51dfda9e292a6c1ae

Signed-off-by: Andrew MacIntyre <[email protected]>
---
dcdp/ptm_tc.c | 1 +
1 file changed, 1 insertion(+)

--- a/dcdp/ptm_tc.c 2023-12-17 16:11:22.503500398 +1100
+++ b/dcdp/ptm_tc.c 2024-01-26 16:48:49.881623474 +1100
@@ -657,6 +657,7 @@ static void ptm_setup(struct net_device
ether_setup(dev);
dev->watchdog_timeo = 10 * HZ;
dev->netdev_ops = &g_ptm_netdev_ops;
+ dev->max_mtu = MAX_MTU;
}

static int ptm_dev_init(struct tc_priv *tc_priv, u32 id,
1 change: 0 additions & 1 deletion package/kernel/ubootenv-nvram/src/ubootenv-nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ static struct platform_driver ubootenv_driver = {
.remove = ubootenv_remove,
.driver = {
.name = NAME,
.owner = THIS_MODULE,
.of_match_table = of_ubootenv_match,
},
};
Expand Down
4 changes: 2 additions & 2 deletions package/libs/libnftnl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libnftnl
PKG_CPE_ID:=cpe:/a:netfilter:libnftnl
PKG_VERSION:=1.2.6
PKG_VERSION:=1.2.8
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
PKG_HASH:=ceeaea2cd92147da19f13a35a7f1a4bc2767ff897e838e4b479cf54b59c777f4
PKG_HASH:=37fea5d6b5c9b08de7920d298de3cdc942e7ae64b1a3e8b880b2d390ae67ad95

PKG_MAINTAINER:=Steven Barth <[email protected]>
PKG_LICENSE:=GPL-2.0-or-later
Expand Down
11 changes: 7 additions & 4 deletions package/libs/wolfssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=wolfssl
PKG_VERSION:=5.7.2-stable
PKG_VERSION:=5.7.2
PKG_REAL_VERSION:=$(PKG_VERSION)-stable
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_REAL_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_REAL_VERSION)
PKG_HASH:=0f2ed82e345b833242705bbc4b08a2a2037a33f7bf9c610efae6464f6b10e305

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_REAL_VERSION)

PKG_FIXUP:=libtool libtool-abiver
PKG_INSTALL:=1
PKG_BUILD_FLAGS:=no-mips16 lto
Expand All @@ -40,7 +43,7 @@ PKG_CONFIG_DEPENDS:=\
CONFIG_WOLFSSL_HAS_TLSV13 \
CONFIG_WOLFSSL_HAS_WPAS

PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))
PKG_ABI_VERSION:=$(PKG_VERSION).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS)))

PKG_CONFIG_DEPENDS+=\
CONFIG_PACKAGE_libwolfssl-benchmark \
Expand Down
6 changes: 3 additions & 3 deletions package/network/config/netifd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
PKG_SOURCE_DATE:=2024-10-06
PKG_SOURCE_VERSION:=3c6265fdbd02ebd35fa3e7a58d6dfeed081a09d7
PKG_MIRROR_HASH:=00b01243b99995dc52a047e5663cf5c7732f8defd6b726f73ac15e142b02b4fa
PKG_SOURCE_DATE:=2024-11-08
PKG_SOURCE_VERSION:=34eb11eb6f5c62de480d6192f0ca840093127fee
PKG_MIRROR_HASH:=c4c2bc626426d2cd73c9ece54b22ada6ed6254afa992f51b8725312aca240cfd
PKG_MAINTAINER:=Felix Fietkau <[email protected]>

PKG_LICENSE:=GPL-2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ _wdev_common_device_config() {
_wdev_common_iface_config() {
config_add_string mode ssid encryption 'key:wpakey'
config_add_boolean bridge_isolate
config_add_array tags
}

_wdev_common_vlan_config() {
Expand Down
Loading

0 comments on commit d035751

Please sign in to comment.