Skip to content

Commit

Permalink
Upstream sync
Browse files Browse the repository at this point in the history
  • Loading branch information
vincejv committed Mar 6, 2024
1 parent babefe8 commit 79e7a39
Show file tree
Hide file tree
Showing 334 changed files with 485 additions and 38,131 deletions.
3 changes: 1 addition & 2 deletions package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ $(curdir)/merge-index: $(curdir)/merge
(cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; )

ifndef SDK
$(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR)
$(curdir)/compile: $(curdir)/system/opkg/host/compile
endif

Expand Down Expand Up @@ -117,8 +118,6 @@ endif

$(curdir)/flags-install:= -j1

$(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR)

$(eval $(call stampfile,$(curdir),package,prereq,.config))
$(eval $(call stampfile,$(curdir),package,cleanup,$(TMP_DIR)/.build))
$(eval $(call stampfile,$(curdir),package,compile,$(TMP_DIR)/.build))
Expand Down
58 changes: 38 additions & 20 deletions package/base-files/files/sbin/sysupgrade
Original file line number Diff line number Diff line change
Expand Up @@ -237,47 +237,61 @@ include /lib/upgrade
create_backup_archive() {
local conf_tar="$1"
local disabled
local err

[ "$(rootfs_type)" = "tmpfs" ] && {
echo "Cannot save config while running from ramdisk." >&2
ask_bool 0 "Abort" && exit
rm -f "$conf_tar"
return 0
}
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
ask_bool 0 "Edit config file list" && vi "$CONFFILES"

[ "$conf_tar" != "-" ] || conf_tar=""

v "Saving config files..."
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
sed -i -e 's,^/,,' "$CONFFILES"
set -o pipefail
{
for service in /etc/init.d/*; do
if ! $service enabled; then
local ret=0

if [ $ret -eq 0 ]; then
for service in /etc/init.d/*; do
if ! $service enabled; then
disabled="$disabled$service disable\n"
fi
done
disabled="$disabled\nexit 0"
tar_print_member "/etc/uci-defaults/10_disable_services" "$(echo -e $disabled)"
fi
done
disabled="$disabled\nexit 0"
tar_print_member "/etc/uci-defaults/10_disable_services" "$(echo -e $disabled)" || ret=1
fi

# Part of archive with installed packages info
if [ "$SAVE_INSTALLED_PKGS" -eq 1 ]; then
# Format: pkg-name<TAB>{rom,overlay,unknown}
# rom is used for pkgs in /rom, even if updated later
tar_print_member "$INSTALLED_PACKAGES" "$(find /usr/lib/opkg/info -name "*.control" \( \
\( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \
\( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \
\( -exec echo {} unknown \; \) \
\) | sed -e 's,.*/,,;s/\.control /\t/')"
if [ $ret -eq 0 ]; then
if [ "$SAVE_INSTALLED_PKGS" -eq 1 ]; then
# Format: pkg-name<TAB>{rom,overlay,unknown}
# rom is used for pkgs in /rom, even if updated later
tar_print_member "$INSTALLED_PACKAGES" "$(find /usr/lib/opkg/info -name "*.control" \( \
\( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \
\( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \
\( -exec echo {} unknown \; \) \
\) | sed -e 's,.*/,,;s/\.control /\t/')" || ret=1
fi
fi

# Rest of archive with config files and ending padding
tar c${TAR_V} -C / -T "$CONFFILES"
} | gzip > "$conf_tar"
if [ $ret -eq 0 ]; then
tar c${TAR_V} -C / -T "$CONFFILES" || ret=1
fi

[ $ret -eq 0 ]
} | gzip > "${conf_tar:-/proc/self/fd/1}"
err=$?
set +o pipefail

local err=$?
if [ "$err" -ne 0 ]; then
echo "Failed to create the configuration backup."
rm -f "$conf_tar"
[ -f "$conf_tar" ] && rm -f "$conf_tar"
fi

rm -f "$CONFFILES"
Expand Down Expand Up @@ -306,7 +320,11 @@ if [ -n "$CONF_RESTORE" ]; then

[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
v "Restoring config files..."
tar -C / -x${TAR_V}zf "$CONF_RESTORE"
if [ "$(type -t platform_restore_backup)" == 'platform_restore_backup' ]; then
platform_restore_backup "$TAR_V"
else
tar -C / -x${TAR_V}zf "$CONF_RESTORE"
fi
exit $?
fi

Expand Down
5 changes: 5 additions & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq60xx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ case "$board" in
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
;;
netgear,wax214)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
esac

config_load ubootenv
Expand Down
8 changes: 5 additions & 3 deletions package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
PKG_SOURCE_DATE:=2024-02-25
PKG_SOURCE_VERSION:=fc30aeeb8ec5d069710a446f4eb5e30fc26145c1
PKG_MIRROR_HASH:=7fe83e3f36541444e0385a56fa8a048772d0531e16787cc10bce29775c7db235
PKG_SOURCE_DATE:=2024-03-04
PKG_SOURCE_VERSION:=38c02ae4302f9cb73f6914574239fe84799caa84
PKG_MIRROR_HASH:=0f6a2dea8466ea0e8df3262bff643d60b1725f2218589c41d9f87fb37843c362

PKG_FLAGS:=nonshared

Expand Down Expand Up @@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \
linksys_mx5300 \
netgear_lbr20 \
netgear_rax120v2 \
netgear_wax214 \
netgear_wax218 \
netgear_wax620 \
netgear_wax630 \
Expand Down Expand Up @@ -157,6 +158,7 @@ $(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200))
$(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300))
$(eval $(call generate-ipq-wifi-package,netgear_lbr20,Netgear LBR20))
$(eval $(call generate-ipq-wifi-package,netgear_rax120v2,Netgear RAX120v2))
$(eval $(call generate-ipq-wifi-package,netgear_wax214,Netgear WAX214))
$(eval $(call generate-ipq-wifi-package,netgear_wax218,Netgear WAX218))
$(eval $(call generate-ipq-wifi-package,netgear_wax620,Netgear WAX620))
$(eval $(call generate-ipq-wifi-package,netgear_wax630,Netgear WAX630))
Expand Down
14 changes: 13 additions & 1 deletion package/kernel/linux/modules/crypto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ $(eval $(call KernelPackage,crypto-rmd160))

define KernelPackage/crypto-rng
TITLE:=CryptoAPI random number generation
DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha512
DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha512 +LINUX_6_6:kmod-crypto-sha3
KCONFIG:= \
CONFIG_CRYPTO_DRBG \
CONFIG_CRYPTO_DRBG_HMAC=y \
Expand Down Expand Up @@ -960,6 +960,18 @@ endif
$(eval $(call KernelPackage,crypto-sha1))


define KernelPackage/crypto-sha3
TITLE:=SHA3 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
KCONFIG:= CONFIG_CRYPTO_SHA3
FILES:=$(LINUX_DIR)/crypto/sha3_generic.ko
AUTOLOAD:=$(call AutoLoad,09,sha3_generic)
$(call AddDepends/crypto)
endef

$(eval $(call KernelPackage,crypto-sha3))


define KernelPackage/crypto-sha256
TITLE:=SHA224 SHA256 digest CryptoAPI module
DEPENDS:=+kmod-crypto-hash
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/linux/modules/hwmon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ define KernelPackage/hwmon-adt7410
$(LINUX_DIR)/drivers/hwmon/adt7x10.ko \
$(LINUX_DIR)/drivers/hwmon/adt7410.ko
AUTOLOAD:=$(call AutoLoad,60,adt7x10 adt7410)
$(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-core)
$(call AddDepends/hwmon,+kmod-i2c-core +!LINUX_5_15:kmod-regmap-core)
endef

define KernelPackage/hwmon-adt7410/description
Expand Down
4 changes: 1 addition & 3 deletions package/kernel/linux/modules/netsupport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,6 @@ define KernelPackage/sched
DEPENDS:=+kmod-sched-core +kmod-lib-crc32c +kmod-lib-textsearch
KCONFIG:= \
CONFIG_NET_SCH_CODEL \
[email protected] \
CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_MULTIQ \
CONFIG_NET_SCH_SFQ \
Expand All @@ -1033,8 +1032,7 @@ define KernelPackage/sched
CONFIG_NET_EMATCH_META \
CONFIG_NET_EMATCH_TEXT
FILES:=$(SCHED_FILES_EXTRA)
FILES+=$(LINUX_DIR)/net/sched/[email protected]
AUTOLOAD:=$(call AutoLoad,73, $(SCHED_MODULES_EXTRA) [email protected])
AUTOLOAD:=$(call AutoLoad,73, $(SCHED_MODULES_EXTRA))
endef

define KernelPackage/sched/description
Expand Down
3 changes: 1 addition & 2 deletions package/kernel/linux/modules/usb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1274,8 +1274,7 @@ $(eval $(call KernelPackage,usb-net-smsc75xx))

define KernelPackage/usb-net-smsc95xx
TITLE:=SMSC LAN95XX based USB 2.0 10/100 ethernet devices
DEPENDS:=+kmod-libphy +kmod-phy-smsc +LINUX_6_1:kmod-net-selftests \
+LINUX_6_6:kmod-net-selftests
DEPENDS:=+kmod-libphy +kmod-phy-smsc +!LINUX_5_15:kmod-net-selftests
KCONFIG:=CONFIG_USB_NET_SMSC95XX
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc95xx.ko
AUTOLOAD:=$(call AutoProbe,smsc95xx)
Expand Down
5 changes: 3 additions & 2 deletions package/kernel/linux/modules/virt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ define KernelPackage/vfio
CONFIG_VFIO_MDEV=n
FILES:= \
$(LINUX_DIR)/drivers/vfio/vfio.ko \
$(LINUX_DIR)/drivers/vfio/vfio_virqfd.ko \
$(LINUX_DIR)/drivers/vfio/vfio_iommu_type1.ko
AUTOLOAD:=$(call AutoProbe,vfio vfio_iommu_type1)
AUTOLOAD:=$(call AutoProbe,vfio vfio_iommu_type1 vfio_virqfd)
endef

define KernelPackage/vfio/description
Expand Down Expand Up @@ -137,4 +138,4 @@ define KernelPackage/vhost-net
AUTOLOAD:=$(call AutoProbe,vhost_net)
endef

$(eval $(call KernelPackage,vhost-net))
$(eval $(call KernelPackage,vhost-net))
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Signed-off-by: Mantas Pucka <[email protected]>
src/init/ssdk_dts.c | 27 +++++++++++++++++++++++++++
4 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/include/init/ssdk_dts.h b/include/init/ssdk_dts.h
index 00fa4c1..210c788 100755
--- a/include/init/ssdk_dts.h
+++ b/include/init/ssdk_dts.h
@@ -101,6 +101,7 @@ typedef struct
Expand All @@ -34,16 +32,14 @@ index 00fa4c1..210c788 100755
} ssdk_dt_cfg;

#define SSDK_MAX_NR_ETH 6
@@ -163,6 +164,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t index);
@@ -162,6 +163,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t
struct device_node *ssdk_dts_node_get(a_uint32_t dev_id);
struct clk *ssdk_dts_essclk_get(a_uint32_t dev_id);
struct clk *ssdk_dts_cmnclk_get(a_uint32_t dev_id);
+a_uint32_t ssdk_dts_port3_pcs_channel_get(a_uint32_t dev_id);

int ssdk_switch_device_num_init(void);
void ssdk_switch_device_num_exit(void);
diff --git a/src/adpt/cppe/adpt_cppe_portctrl.c b/src/adpt/cppe/adpt_cppe_portctrl.c
index 00d0404..6b32f79 100755
--- a/src/adpt/cppe/adpt_cppe_portctrl.c
+++ b/src/adpt/cppe/adpt_cppe_portctrl.c
@@ -33,6 +33,7 @@
Expand All @@ -54,7 +50,7 @@ index 00d0404..6b32f79 100755
#include "adpt.h"
#include "adpt_hppe.h"
#include "adpt_cppe_portctrl.h"
@@ -60,8 +61,7 @@ _adpt_cppe_port_mux_mac_set(a_uint32_t dev_id, fal_port_t port_id,
@@ -60,8 +61,7 @@ _adpt_cppe_port_mux_mac_set(a_uint32_t d
case SSDK_PHYSICAL_PORT3:
case SSDK_PHYSICAL_PORT4:
if (mode0 == PORT_WRAPPER_PSGMII) {
Expand All @@ -64,11 +60,9 @@ index 00d0404..6b32f79 100755
cppe_port_mux_ctrl.bf.port3_pcs_sel =
CPPE_PORT3_PCS_SEL_PCS0_CHANNEL4;
cppe_port_mux_ctrl.bf.port4_pcs_sel =
diff --git a/src/adpt/hppe/adpt_hppe_uniphy.c b/src/adpt/hppe/adpt_hppe_uniphy.c
index 5e36602..bad1eab 100644
--- a/src/adpt/hppe/adpt_hppe_uniphy.c
+++ b/src/adpt/hppe/adpt_hppe_uniphy.c
@@ -1122,9 +1122,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uint32_t dev_id, a_uint32_t uniphy_index)
@@ -1122,9 +1122,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
{
a_uint32_t i;
sw_error_t rv = SW_OK;
Expand All @@ -78,7 +72,7 @@ index 5e36602..bad1eab 100644

union uniphy_mode_ctrl_u uniphy_mode_ctrl;

@@ -1134,9 +1131,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uint32_t dev_id, a_uint32_t uniphy_index)
@@ -1134,9 +1131,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
SSDK_DEBUG("uniphy %d is psgmii mode\n", uniphy_index);
#if defined(CPPE)
if (adpt_ppe_type_get(dev_id) == CPPE_TYPE) {
Expand All @@ -89,11 +83,9 @@ index 5e36602..bad1eab 100644
SSDK_INFO("cypress uniphy %d is qca8072 psgmii mode\n", uniphy_index);
rv = __adpt_cppe_uniphy_mode_set(dev_id, uniphy_index,
PORT_WRAPPER_PSGMII);
diff --git a/src/init/ssdk_dts.c b/src/init/ssdk_dts.c
index 686b6d2..70b0a09 100644
--- a/src/init/ssdk_dts.c
+++ b/src/init/ssdk_dts.c
@@ -279,6 +279,13 @@ struct clk *ssdk_dts_cmnclk_get(a_uint32_t dev_id)
@@ -272,6 +272,13 @@ struct clk *ssdk_dts_cmnclk_get(a_uint32
return cfg->cmnblk_clk;
}

Expand All @@ -107,7 +99,7 @@ index 686b6d2..70b0a09 100644
#ifndef BOARD_AR71XX
#if defined(CONFIG_OF) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
static void ssdk_dt_parse_mac_mode(a_uint32_t dev_id,
@@ -313,6 +320,25 @@ static void ssdk_dt_parse_mac_mode(a_uint32_t dev_id,
@@ -306,6 +313,25 @@ static void ssdk_dt_parse_mac_mode(a_uin

return;
}
Expand All @@ -133,14 +125,11 @@ index 686b6d2..70b0a09 100644
#ifdef IN_UNIPHY
static void ssdk_dt_parse_uniphy(a_uint32_t dev_id)
{
@@ -1307,6 +1333,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *cfg, a_uint32_t num, a_uint32_t *dev_id)
@@ -1292,6 +1318,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *
rv = ssdk_dt_parse_access_mode(switch_node, ssdk_dt_priv);
SW_RTN_ON_ERROR(rv);
ssdk_dt_parse_mac_mode(*dev_id, switch_node, cfg);
+ ssdk_dt_parse_port3_pcs_channel(*dev_id, switch_node, cfg);
ssdk_dt_parse_mdio(*dev_id, switch_node, cfg);
ssdk_dt_parse_port_bmp(*dev_id, switch_node, cfg);
ssdk_dt_parse_interrupt(*dev_id, switch_node);
--
2.7.4

Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ SVN-Revision: 35130
case IPV6_2292HOPOPTS:
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -1003,7 +1003,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
@@ -1013,7 +1013,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
goto drop;
}

Expand Down
5 changes: 4 additions & 1 deletion target/linux/bcm27xx/base-files/lib/preinit/79_move_config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ move_config() {
insmod vfat
mkdir -p /boot
mount -t vfat -o rw,noatime /dev/$partdev /boot
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
if [ -f "/boot/$BACKUP_FILE" ]; then
mv -f "/boot/$BACKUP_FILE" /
export BCM27XX_SET_ROOT_PART=1
fi
fi
}

Expand Down
12 changes: 12 additions & 0 deletions target/linux/bcm27xx/base-files/lib/preinit/81_set_root_part
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only

. /lib/upgrade/platform.sh

do_set_root_part() {
if [ "$BCM27XX_SET_ROOT_PART" -eq "1" ]; then
bcm27xx_set_root_part
unset BCM27XX_SET_ROOT_PART
fi
}

[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_set_root_part
Loading

0 comments on commit 79e7a39

Please sign in to comment.