Merge branch 'master'

This commit is contained in:
VIKING 2025-07-10 00:25:11 +08:00
commit 9816d1baa5
15 changed files with 280 additions and 134 deletions

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ncurses
PKG_CPE_ID:=cpe:/a:gnu:ncurses
PKG_VERSION:=6.4
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
@ -52,7 +52,7 @@ define Package/libncurses-dev
TITLE:=Development files for the ncurses library
endef
TARGET_CFLAGS += $(FPIC)
TARGET_CFLAGS += $(FPIC) -std=gnu17
CONFIGURE_ARGS += \
--enable-echo \

View File

@ -1,113 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libxcrypt
PKG_VERSION:=4.4.38
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/besser82/libxcrypt/releases/download/v$(PKG_VERSION)
PKG_HASH:=80304b9c306ea799327f01d9a7549bdb28317789182631f1b54f4511b4206dd6
PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING.LIB
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS:= \
CONFIG_USE_GLIBC \
CONFIG_PACKAGE_libcrypt-compat \
CONFIG_PACKAGE_libxcrypt
include $(INCLUDE_DIR)/package.mk
define Package/libxcrypt/Default
SECTION:=libs
CATEGORY:=Libraries
URL:=https://github.com/besser82/libxcrypt
TITLE:=Extended crypt library
endef
define Package/libxcrypt
$(Package/libxcrypt/Default)
VARIANT:=regular
BUILDONLY:=1
endef
define Package/libcrypt-compat
$(Package/libxcrypt/Default)
VARIANT:=compat
TITLE+= - libc compatibility
DEPENDS:=@USE_GLIBC
endef
define Package/libxcrypt/description
libxcrypt is a modern library for one-way hashing of passwords. It supports
a wide variety of both modern and historical hashing methods: yescrypt,
gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt, SunMD5,
sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. It provides the traditional
Unix crypt and crypt_r interfaces, as well as a set of extended interfaces
pioneered by Openwall Linux, crypt_rn, crypt_ra, crypt_gensalt,
crypt_gensalt_rn, and crypt_gensalt_ra.
endef
Package/libcrypt-compat/description=$(Package/libxcrypt/description)
CONFIGURE_ARGS += \
--with-pic \
--enable-year2038 \
--disable-xcrypt-compat-files
ifeq ($(BUILD_VARIANT),regular)
CONFIGURE_ARGS += \
--disable-shared \
--disable-failure-tokens \
--disable-obsolete-api \
--enable-hashes=solaris
endif
ifeq ($(BUILD_VARIANT),compat)
CONFIGURE_ARGS += \
--enable-obsolete-api=glibc \
--enable-hashes=glibc
endif
define Package/libxcrypt/install
true
endef
define Package/libcrypt-compat/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.so.* $(1)/usr/lib/
endef
define Build/libxcrypt/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/libxcrypt
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.{a,la} $(1)/usr/lib/libxcrypt
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxcrypt.pc $(1)/usr/lib/pkgconfig/
endef
define Build/libcrypt-compat/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.{a,la,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
# libcrypt.pc is symlink to libxcrypt.pc
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxcrypt.pc $(1)/usr/lib/pkgconfig/libcrypt.pc
endef
ifeq ($(BUILD_VARIANT),regular)
Build/InstallDev=$(Build/libxcrypt/InstallDev)
endif
ifeq ($(BUILD_VARIANT),compat)
Build/InstallDev=$(Build/libcrypt-compat/InstallDev)
endif
$(eval $(call BuildPackage,libcrypt-compat))
$(eval $(call BuildPackage,libxcrypt))

View File

@ -0,0 +1,40 @@
include $(TOPDIR)/rules.mk
include ../libxcrypt-common.mk
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/libcrypt-compat/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/libcrypt-compat
$(Package/libxcrypt/Default)
TITLE+= - libc compatibility
DEPENDS:=@USE_GLIBC
endef
Package/libcrypt-compat/description=$(Package/libxcrypt/description)
CONFIGURE_ARGS += \
--with-pic \
--enable-year2038 \
--disable-xcrypt-compat-files \
--enable-obsolete-api=glibc \
--enable-hashes=glibc
define Package/libcrypt-compat/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.so.* $(1)/usr/lib/
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.{a,la,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
# libcrypt.pc is symlink to libxcrypt.pc
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxcrypt.pc $(1)/usr/lib/pkgconfig/libcrypt.pc
endef
$(eval $(call BuildPackage,libcrypt-compat))

View File

@ -0,0 +1,28 @@
PKG_SOURCE_NAME:=libxcrypt
PKG_VERSION:=4.4.38
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/besser82/$(PKG_SOURCE_NAME)/releases/download/v$(PKG_VERSION)
PKG_HASH:=80304b9c306ea799327f01d9a7549bdb28317789182631f1b54f4511b4206dd6
PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING.LIB
define Package/libxcrypt/Default
SECTION:=libs
CATEGORY:=Libraries
URL:=https://github.com/besser82/libxcrypt
TITLE:=Extended crypt library
endef
define Package/libxcrypt/description
libxcrypt is a modern library for one-way hashing of passwords. It supports
a wide variety of both modern and historical hashing methods: yescrypt,
gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt, SunMD5,
sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. It provides the traditional
Unix crypt and crypt_r interfaces, as well as a set of extended interfaces
pioneered by Openwall Linux, crypt_rn, crypt_ra, crypt_gensalt,
crypt_gensalt_rn, and crypt_gensalt_ra.
endef

View File

@ -0,0 +1,47 @@
include $(TOPDIR)/rules.mk
include ../libxcrypt-common.mk
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/libxcrypt
$(Package/libxcrypt/Default)
BUILDONLY:=1
endef
define Package/libxcrypt/description
libxcrypt is a modern library for one-way hashing of passwords. It supports
a wide variety of both modern and historical hashing methods: yescrypt,
gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt, SunMD5,
sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. It provides the traditional
Unix crypt and crypt_r interfaces, as well as a set of extended interfaces
pioneered by Openwall Linux, crypt_rn, crypt_ra, crypt_gensalt,
crypt_gensalt_rn, and crypt_gensalt_ra.
endef
CONFIGURE_ARGS += \
--with-pic \
--enable-year2038 \
--disable-xcrypt-compat-files \
--disable-shared \
--disable-failure-tokens \
--disable-obsolete-api \
--enable-hashes=solaris
define Package/libxcrypt/install
true
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/libxcrypt
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.{a,la} $(1)/usr/lib/libxcrypt
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxcrypt.pc $(1)/usr/lib/pkgconfig/
endef
$(eval $(call BuildPackage,libxcrypt))

View File

@ -412,7 +412,11 @@ function bss_reload_rxkhs(bss, config, old_config)
function remove_file_fields(config)
{
return filter(config, (line) => !hostapd.data.file_fields[split(line, "=")[0]]);
return filter(config, (line) =>
!match(line, /^\s*$/) &&
!match(line, /^\s*#/) &&
!hostapd.data.file_fields[split(line, "=")[0]]
);
}
function bss_remove_file_fields(config)

View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcpd
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git

View File

@ -21,7 +21,6 @@ case "$protocol" in
# only enable server mode on statically addressed lan ports
"static")
V4MODE=server
V6MODE=server
;;
esac
@ -43,10 +42,9 @@ set dhcp.odhcpd.leasefile=/tmp/hosts/odhcpd
set dhcp.odhcpd.leasetrigger=/usr/sbin/odhcpd-update
set dhcp.odhcpd.loglevel=4
set dhcp.lan.dhcpv4=$V4MODE
set dhcp.lan.dhcpv6=disabled
set dhcp.lan.dhcpv6=$V6MODE
set dhcp.lan.ra=$V6MODE
set dhcp.lan.ra_slaac=1
add_list dhcp.lan.ra_flags=other-config
set dhcp.lan.max_preferred_lifetime=2700
set dhcp.lan.max_valid_lifetime=5400
commit dhcp

View File

@ -3442,6 +3442,7 @@ define Device/zyxel_nwa11xx
append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
pad-rootfs | pad-to 8192k | check-size | zyxel-tar-bz2 \
vmlinux_mi124_f1e mi124_f1e-jffs2 | append-md5sum-bin
DEFAULT := n
endef
define Device/zyxel_nwa1100-nh

View File

@ -98,6 +98,11 @@ static int32 _phy_patch_process(uint32 unit, rtk_port_t port, uint8 portOffset,
return (chk_ret == RT_ERR_CHECK_FAILED) ? chk_ret : RT_ERR_OK;
}
rtk_hwpatch_t rtl826XB_patch_rtk_conf[] = {
{RTK_PATCH_OP_PSDS0 , 0xff , 0x07 , 0x10 , 15, 0, 0x80aa, RTK_PATCH_CMP_WC , 0, 0, 0, 0},
{RTK_PATCH_OP_PSDS0 , 0xff , 0x06 , 0x12 , 15, 0, 0x5078, RTK_PATCH_CMP_WC , 0, 0, 0, 0},
};
/* Function Name:
* phy_patch
* Description:
@ -170,10 +175,14 @@ int32 phy_patch(uint32 unit, rtk_port_t port, uint8 portOffset, uint8 patch_mode
break;
}
}
ret = _phy_patch_process(unit, port, portOffset, rtl826XB_patch_rtk_conf, sizeof(rtl826XB_patch_rtk_conf), patch_mode);
if (ret == RT_ERR_CHECK_FAILED)
chk_ret = ret;
else if (ret != RT_ERR_OK)
{
RT_LOG(LOG_MAJOR_ERR, (MOD_HAL | MOD_PHY), "U%u P%u patch_mode:%u id:%u patch-%u failed. ret:0x%X\n", unit, port, patch_mode, i, patch_type, ret);
return ret;
}
return (chk_ret == RT_ERR_CHECK_FAILED) ? chk_ret : RT_ERR_OK;
}

View File

@ -13,6 +13,7 @@
#define REALTEK_PHY_ID_RTL8261N 0x001CCAF3
#define REALTEK_PHY_ID_RTL8264B 0x001CC813
#define REALTEK_PHY_ID_RTL8264 0x001CCAF2
static int rtl826xb_get_features(struct phy_device *phydev)
{
@ -66,8 +67,11 @@ static int rtkphy_config_init(struct phy_device *phydev)
{
case REALTEK_PHY_ID_RTL8261N:
case REALTEK_PHY_ID_RTL8264B:
phydev_info(phydev, "%s:%u [RTL8261N/RTL826XB] phy_id: 0x%X PHYAD:%d\n", __FUNCTION__, __LINE__, phydev->drv->phy_id, phydev->mdio.addr);
case REALTEK_PHY_ID_RTL8264:
phydev_info(phydev, "%s:%u [RTL8261N/RTL8264/RTL826XB] phy_id: 0x%X PHYAD:%d\n", __FUNCTION__, __LINE__, phydev->drv->phy_id, phydev->mdio.addr);
#ifdef CONFIG_MACH_REALTEK_RTL
return 0;
#endif
#if 1 /* toggle reset */
phy_modify_mmd_changed(phydev, 30, 0x145, BIT(0) , 1);
@ -126,7 +130,9 @@ static int rtkphy_c45_suspend(struct phy_device *phydev)
{
int ret = 0;
#ifndef CONFIG_MACH_REALTEK_RTL
ret = rtk_phylib_c45_power_low(phydev);
#endif
phydev->speed = SPEED_UNKNOWN;
phydev->duplex = DUPLEX_UNKNOWN;
@ -138,7 +144,11 @@ static int rtkphy_c45_suspend(struct phy_device *phydev)
static int rtkphy_c45_resume(struct phy_device *phydev)
{
#ifndef CONFIG_MACH_REALTEK_RTL
return rtk_phylib_c45_power_normal(phydev);
#else
return 0;
#endif
}
static int rtkphy_c45_config_aneg(struct phy_device *phydev)
@ -264,6 +274,18 @@ static struct phy_driver rtk_phy_drivers[] = {
.aneg_done = rtkphy_c45_aneg_done,
.read_status = rtkphy_c45_read_status,
},
{
PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8264),
.name = "Realtek RTL8264",
.get_features = rtl826xb_get_features,
.config_init = rtkphy_config_init,
.probe = rtl826xb_probe,
.suspend = rtkphy_c45_suspend,
.resume = rtkphy_c45_resume,
.config_aneg = rtkphy_c45_config_aneg,
.aneg_done = rtkphy_c45_aneg_done,
.read_status = rtkphy_c45_read_status,
},
};
module_phy_driver(rtk_phy_drivers);
@ -272,6 +294,7 @@ module_phy_driver(rtk_phy_drivers);
static struct mdio_device_id __maybe_unused rtk_phy_tbl[] = {
{ PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8261N) },
{ PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8264B) },
{ PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8264) },
{ },
};

View File

@ -0,0 +1,81 @@
commit eb6c3ba1d42fd087708f568ca220ff557f22104e
Author: Jakob Haufe <sur5r@sur5r.net>
Date: Tue Jun 17 13:58:19 2025 +0200
MIPS: OCTEON: Add UBNT specific DTS pruning
This imports device specific DTS pruning from
https://github.com/UI-Packages/kernel_e200/blob/master/arch/mips/cavium-octeon/octeon-platform.c#L1067
- Reduce MMC clock frequency on E200/E220 to make
MMC communication reliable again. See linked issue.
- Remove unused MMC node on E300.
Related: https://github.com/openwrt/openwrt/issues/13762
Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -1133,6 +1133,41 @@ end_led:
}
#endif
+
+ return 0;
+}
+
+int __init ubnt_prune_device_tree(void)
+{
+ /* MMC on UBNT */
+ pr_info("UBNT board DTS pruning...\n");
+ if (octeon_bootinfo->board_type == CVMX_BOARD_TYPE_UBNT_E300) {
+ pr_info("UBNT E300 found, looking for mmc-slot@2\n");
+ // Remove unused MMC slot definition
+ int mmc_slot2 = fdt_path_offset(initial_boot_params, "/soc/mmc/mmc-slot@2");
+
+ if (mmc_slot2 > 0) {
+ pr_info("UBNT E300 found, deleting mmc-slot@2\n");
+ fdt_nop_node(initial_boot_params, mmc_slot2);
+ } else {
+ pr_info("mmc-slot@2 not found\n");
+ }
+ } else if (octeon_bootinfo->board_type == CVMX_BOARD_TYPE_UBNT_E200 ||
+ octeon_bootinfo->board_type == CVMX_BOARD_TYPE_UBNT_E220) {
+ pr_info("UBNT E200/E220 found, looking for mmc-slot@0\n");
+ int mmc_slot0 = fdt_path_offset(initial_boot_params, "/soc/mmc/mmc-slot@0");
+
+ u32 freq = 26000000;
+
+ if (mmc_slot0 > 0) {
+ pr_info("UBNT E200/E220 mmc-slot@0 found, setting frequency to 26MHz");
+ fdt_setprop_inplace_cell(initial_boot_params, mmc_slot0,
+ "spi-max-frequency", freq);
+ } else {
+ pr_info("mmc-slot@0 not found\n");
+ }
+ }
+
return 0;
}
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -1168,6 +1168,7 @@ void __init prom_free_prom_memory(void)
}
}
+int __init ubnt_prune_device_tree(void);
void __init octeon_fill_mac_addresses(void);
void __init device_tree_init(void)
@@ -1207,6 +1208,9 @@ void __init device_tree_init(void)
octeon_prune_device_tree();
pr_info("Using internal Device Tree.\n");
}
+
+ ubnt_prune_device_tree();
+
if (fill_mac)
octeon_fill_mac_addresses();
unflatten_and_copy_device_tree();

View File

@ -0,0 +1,32 @@
libatomic: Do not enforce march on aarch64
Inspired by The Yocto Project [1].
[1] https://github.com/yoctoproject/poky/blob/51192a79f1717786dda42776f916c3d97ada7971/meta/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
libatomic/Makefile.am | 1 -
libatomic/Makefile.in | 1 -
2 files changed, 2 deletions(-)
--- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am
@@ -128,7 +128,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZE
## On a target-specific basis, include alternates to be selected by IFUNC.
if HAVE_IFUNC
if ARCH_AARCH64_LINUX
-IFUNC_OPTIONS = -march=armv8-a+lse
libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
endif
--- a/libatomic/Makefile.in
+++ b/libatomic/Makefile.in
@@ -452,7 +452,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE)
libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
_$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_4)
-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
@ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
@ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16

View File

@ -34,11 +34,9 @@ Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
zlib/zutil.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zlib/zutil.h b/zlib/zutil.h
index 4b596adf629..9ea8d840643 100644
--- a/zlib/zutil.h
+++ b/zlib/zutil.h
@@ -130,7 +130,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
@@ -130,7 +130,7 @@ extern z_const char * const z_errmsg[10]
# endif
#endif
@ -47,6 +45,3 @@ index 4b596adf629..9ea8d840643 100644
# define OS_CODE 7
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
--
2.49.0

View File

@ -3,12 +3,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mold
PKG_VERSION:=2.39.1
PKG_VERSION:=2.40.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/rui314/mold/archive/refs/tags
PKG_HASH:=231ea3643a14fe5b88478c97b68b31f7c975b57b247a81356ffd889d015b5cc1
PKG_HASH:=d1ce09a69941f8158604c3edcc96c7178231e7dba2da66b20f5ef6e112c443b7
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk