Skip to content

Commit

Permalink
Merge branch 'main' into bananapi4-nvme-wip
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Storm committed Dec 23, 2024
2 parents f4f213d + a0ff3c1 commit 9b0d105
Show file tree
Hide file tree
Showing 18 changed files with 99 additions and 23 deletions.
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 = .66
LINUX_KERNEL_HASH-6.6.66 = 9d757937c4661c2f512c62641b74ef74eff9bb13dc5dbcbaaa108c21152f1e52
LINUX_VERSION-6.6 = .67
LINUX_KERNEL_HASH-6.6.67 = e41da482ec42a3b0e2b8ed2574c1d327e3dcf95cdf025c55a356b04307113e1a
2 changes: 1 addition & 1 deletion package/utils/busybox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=busybox
PKG_VERSION:=1.37.0
PKG_RELEASE:=2
PKG_RELEASE:=4
PKG_FLAGS:=essential

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
Expand Down
6 changes: 2 additions & 4 deletions package/utils/busybox/patches/001-fix-non-x86-build.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Index: busybox-1.37.0/libbb/hash_md5_sha.c
===================================================================
--- busybox-1.37.0.orig/libbb/hash_md5_sha.c
+++ busybox-1.37.0/libbb/hash_md5_sha.c
--- a/libbb/hash_md5_sha.c
+++ b/libbb/hash_md5_sha.c
@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t *
hash_size = 8;
if (ctx->process_block == sha1_process_block64
Expand Down
49 changes: 49 additions & 0 deletions package/utils/busybox/patches/002-upstream-fix-hexdump.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From 87e60dcf0f7ef917b73353d8605188a420bd91f9 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 28 Oct 2024 15:26:21 +0100
Subject: hexdump: fix regression with -n4 -e '"%u"'

Fix bug introduced in busybox 1.37.0 that broke kernel builds.

Fixes commit e2287f99fe6f (od: for !DESKTOP, match output more closely
to GNU coreutils 9.1, implement -s)

function old new delta
rewrite 967 976 +9

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
libbb/dump.c | 6 ++++--
testsuite/hexdump.tests | 6 ++++++
2 files changed, 10 insertions(+), 2 deletions(-)

--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -198,9 +198,11 @@ static NOINLINE void rewrite(priv_dumper
if (!e)
goto DO_BAD_CONV_CHAR;
pr->flags = F_INT;
- if (e > int_convs + 1) /* not d or i? */
- pr->flags = F_UINT;
byte_count_str = "\010\004\002\001";
+ if (e > int_convs + 1) { /* not d or i? */
+ pr->flags = F_UINT;
+ byte_count_str++;
+ }
goto DO_BYTE_COUNT;
} else
if (strchr(int_convs, *p1)) { /* %d etc */
--- a/testsuite/hexdump.tests
+++ b/testsuite/hexdump.tests
@@ -82,4 +82,10 @@ testing "hexdump -e /2 %d" \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"\
"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"\

+testing "hexdump -n4 -e '\"%u\"'" \
+ "hexdump -n4 -e '\"%u\"'" \
+ "12345678" \
+ "" \
+ "\x4e\x61\xbc\x00AAAA"
+
exit $FAILCOUNT
Original file line number Diff line number Diff line change
Expand Up @@ -17583,7 +17583,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
* For devices with more than one control interface, we assume the
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2233,6 +2233,8 @@ static const struct usb_audio_quirk_flag
@@ -2247,6 +2247,8 @@ static const struct usb_audio_quirk_flag
QUIRK_FLAG_ALIGN_TRANSFER),
DEVICE_FLG(0x534d, 0x2109, /* MacroSilicon MS2109 */
QUIRK_FLAG_ALIGN_TRANSFER),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
return;

val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3);
@@ -1021,7 +1022,7 @@ static struct phy_driver broadcom_driver
@@ -1019,7 +1020,7 @@ static struct phy_driver broadcom_driver
.link_change_notify = bcm54xx_link_change_notify,
}, {
.phy_id = PHY_ID_BCM54210E,
Expand All @@ -35,7 +35,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
.name = "Broadcom BCM54210E",
/* PHY_GBIT_FEATURES */
.flags = PHY_ALWAYS_CALL_SUSPEND,
@@ -1039,6 +1040,13 @@ static struct phy_driver broadcom_driver
@@ -1037,6 +1038,13 @@ static struct phy_driver broadcom_driver
.set_wol = bcm54xx_phy_set_wol,
.led_brightness_set = bcm_phy_led_brightness_set,
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>

--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -1052,8 +1052,14 @@ static struct phy_driver broadcom_driver
@@ -1050,8 +1050,14 @@ static struct phy_driver broadcom_driver
.phy_id_mask = 0xffffffff,
.name = "Broadcom BCM54213PE",
/* PHY_GBIT_FEATURES */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -1001,6 +1001,8 @@ static struct phy_driver broadcom_driver
.config_intr = bcm_phy_config_intr,
@@ -1061,6 +1061,8 @@ static struct phy_driver broadcom_driver
.handle_interrupt = bcm_phy_handle_interrupt,
.link_change_notify = bcm54xx_link_change_notify,
.led_brightness_set = bcm_phy_led_brightness_set,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
}, {
.phy_id = PHY_ID_BCM5421,
.phy_id = PHY_ID_BCM54616S,
.phy_id_mask = 0xfffffff0,
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+
#endif /* __KERNEL__ */

/*
@@ -243,6 +245,4 @@ static inline void *offset_to_ptr(const
/**
@@ -258,6 +260,4 @@ static inline void *offset_to_ptr(const
*/
#define prevent_tail_call_optimization() mb()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -8417,7 +8417,7 @@ static int nft_register_flowtable_net_ho
@@ -8421,7 +8421,7 @@ static int nft_register_flowtable_net_ho
err = flowtable->data.type->setup(&flowtable->data,
hook->ops.dev,
FLOW_BLOCK_BIND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
phy-connection-type = "internal";
phy = <&int_2p5g_phy>;
status = "okay";
openwrt,netdev-name = "lan4";
};

&int_2p5g_phy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
managed = "in-band-status";
phy-mode = "usxgmii";
status = "okay";
openwrt,netdev-name = "sfp-lan";
};

&pca9545 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
managed = "in-band-status";
phy-mode = "usxgmii";
status = "okay";
openwrt,netdev-name = "sfp-wan";
};

&switch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ mediatek_setup_interfaces()
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" eth1
;;
bananapi,bpi-r3)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan"
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "sfp1 wan"
;;
bananapi,bpi-r3-mini|\
edgecore,eap111)
ucidef_set_interfaces_lan_wan eth0 eth1
;;
bananapi,bpi-r4|\
bananapi,bpi-r4)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 sfp-lan" "wan sfp-wan"
;;
bananapi,bpi-r4-poe)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2"
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan sfp-wan"
;;
comfast,cf-e393ax)
ucidef_set_interfaces_lan_wan "lan1" eth1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ board_config_update

case "$(board_name)" in
bananapi,bpi-r3)
ucidef_set_compat_version "1.2"
ucidef_set_compat_version "1.3"
;;
routerich,ax3000)
ucidef_set_compat_version "1.1"
;;
bananapi,bpi-r4|\
bananapi,bpi-r4-poe)
ucidef_set_compat_version "1.1"
;;
esac

board_config_flush
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ set_netdev_labels() {
[ "$netdev" = "$label" ] && continue
ip link set "$netdev" name "$label"
done

for dir in /sys/class/net/*; do
[ -r "$dir/of_node/openwrt,netdev-name" ] || continue
read -r label < "$dir/of_node/openwrt,netdev-name"
netdev="${dir##*/}"
[ "$netdev" = "$label" ] && continue
ip link set "$netdev" name "$label"
done
}

boot_hook_add preinit_main set_netdev_labels
6 changes: 4 additions & 2 deletions target/linux/mediatek/image/filogic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ endif
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | pad-rootfs | append-metadata
DEVICE_DTC_FLAGS := --pad 4096
DEVICE_COMPAT_VERSION := 1.2
DEVICE_COMPAT_MESSAGE := SPI-NAND flash layout changes require bootloader update
DEVICE_COMPAT_VERSION := 1.3
DEVICE_COMPAT_MESSAGE := First sfp port renamed from eth1 to sfp1
endef
TARGET_DEVICES += bananapi_bpi-r3

Expand Down Expand Up @@ -433,6 +433,8 @@ define Device/bananapi_bpi-r4-common
DEVICE_DTC_FLAGS := --pad 4096
DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-mux-pca954x kmod-eeprom-at24 kmod-mt7996-firmware kmod-mt7996-233-firmware \
kmod-rtc-pcf8563 kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs mt7988-wo-firmware
DEVICE_COMPAT_VERSION := 1.1
DEVICE_COMPAT_MESSAGE := The non-switch ports were renamed to match the board/case labels
IMAGES := sysupgrade.itb
KERNEL_LOADADDR := 0x46000000
KERNEL_INITRAMFS_SUFFIX := -recovery.itb
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
@@ -195,6 +195,7 @@
phy-mode = "2500base-x";
sfp = <&sfp1>;
managed = "in-band-status";
+ openwrt,netdev-name = "sfp1";
};

mdio: mdio-bus {

0 comments on commit 9b0d105

Please sign in to comment.