From 471b8bf8c14f7dba8a426f2c6448744d4c5ac151 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 25 Apr 2020 10:18:22 +0100 Subject: [PATCH 01/30] procd: extend requirejail attribute handling e2ed964 jail: don't fail unless requirejail is set 17e7ae7 jail: don't load libpreload-seccomp.so if it doesn't exist Fixes openwrt/packages#11913 Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index a5428bfe7e..8ae1e3f12f 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-04-19 -PKG_SOURCE_VERSION:=d200b70e5d5b0b3b61e2573f1c2fa22b3fa9d63a -PKG_MIRROR_HASH:=f56a7d8d74a9996fb83b6815446979550b7786019c97343fa5591d78e2b9c528 +PKG_SOURCE_DATE:=2020-04-25 +PKG_SOURCE_VERSION:=17e7ae769a4739e4b41a93f588d52cfd216b8eb2 +PKG_MIRROR_HASH:=6763cb63a53222d44be3b1ef238f3b9198d31fd533534abbbdc02202d3ef88e0 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 4a3e0f736f7b14e3e0df9c373f7d798a2247df23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sat, 25 Apr 2020 11:13:41 +0200 Subject: [PATCH 02/30] imx6: add back perf monitor related config symbol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 0543eb111081 ("imx6: 5.4: add missing kernel perf monitor symbol") has added missing kernel config symbol FSL_IMX8_DDR_PMU which is exposed only when building perf, so add it back. Fixes: 8d9b36270b1f ("imx6: refresh kernel config") Signed-off-by: Petr Štetiar --- target/linux/imx6/config-5.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/imx6/config-5.4 b/target/linux/imx6/config-5.4 index 93f42aba3c..bb8a80de74 100644 --- a/target/linux/imx6/config-5.4 +++ b/target/linux/imx6/config-5.4 @@ -202,6 +202,7 @@ CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FSL_GUTS=y CONFIG_FS_ENCRYPTION=y +# CONFIG_FSL_IMX8_DDR_PMU is not set CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y CONFIG_FS_POSIX_ACL=y From ef5d37ba5ee5c3ba9cc6943b3732194256beb812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sat, 25 Apr 2020 10:58:07 +0200 Subject: [PATCH 03/30] kernel: bump 5.4 to 5.4.35 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refreshed one patch. Run tested: qemu-x86-64 Build tested: x86/64, imx6, sunxi/a53, rockchip/armv8 Signed-off-by: Petr Štetiar --- include/kernel-version.mk | 4 ++-- ...0281-drm-vc4-A-present-but-empty-dmas-disables-audio.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index fe82cdc1b1..1d1c8f6bdf 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.14 = .176 LINUX_VERSION-4.19 = .115 -LINUX_VERSION-5.4 = .34 +LINUX_VERSION-5.4 = .35 LINUX_KERNEL_HASH-4.14.176 = bcae0956baaeb55dab5bad0401873fbc5baaa7fbe957ea6d27a5ab241cec5ca2 LINUX_KERNEL_HASH-4.19.115 = 11b2d97c8ea5ceb40c5e1d0bb87ad5b2b8c84560181bc60c0d28ec3a3e3801c2 -LINUX_KERNEL_HASH-5.4.34 = 903ec1334daba6a626688f799cc947b420cf6fc8ce83055313dc4e9978d64cd2 +LINUX_KERNEL_HASH-5.4.35 = e16bd5f7284a80a41328bf712e1136b0adf5b71cc0bd263efa7cac75539806d4 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/bcm27xx/patches-5.4/950-0281-drm-vc4-A-present-but-empty-dmas-disables-audio.patch b/target/linux/bcm27xx/patches-5.4/950-0281-drm-vc4-A-present-but-empty-dmas-disables-audio.patch index 84b044eb63..b0c5b969f2 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0281-drm-vc4-A-present-but-empty-dmas-disables-audio.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0281-drm-vc4-A-present-but-empty-dmas-disables-audio.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1054,10 +1054,12 @@ static int vc4_hdmi_audio_init(struct vc +@@ -1066,10 +1066,12 @@ static int vc4_hdmi_audio_init(struct vc struct device *dev = &hdmi->pdev->dev; const __be32 *addr; int ret; From 63696bd0fb9c97d6be6f91e360e46a9a9d0eab3c Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Wed, 11 Mar 2020 01:32:12 +0800 Subject: [PATCH 04/30] kernel: backport support for clause 37 1000Base-X auto-negotiation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch is needed for clause 37 1000Base-X encoding used in many SFP modules. Signed-off-by: DENG Qingfang Signed-off-by: René van Dorst --- ...pport-for-clause-37-auto-negotiation.patch | 199 ++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch diff --git a/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch new file mode 100644 index 0000000000..da76523730 --- /dev/null +++ b/target/linux/generic/backport-5.4/750-v5.5-net-phy-add-support-for-clause-37-auto-negotiation.patch @@ -0,0 +1,199 @@ +From fa6e98cee558622565c97924e922b97340aeabd8 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Tue, 22 Oct 2019 11:31:07 -0700 +Subject: [PATCH] net: phy: add support for clause 37 auto-negotiation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch adds support for clause 37 1000Base-X auto-negotiation. + +Signed-off-by: Heiner Kallweit +Signed-off-by: Tao Ren +Tested-by: René van Dorst +Reviewed-by: Andrew Lunn +Signed-off-by: David S. Miller +--- + drivers/net/phy/phy_device.c | 139 +++++++++++++++++++++++++++++++++++ + include/linux/phy.h | 4 + + 2 files changed, 143 insertions(+) + +diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c +index f1f60bd4865a..fa71998fea51 100644 +--- a/drivers/net/phy/phy_device.c ++++ b/drivers/net/phy/phy_device.c +@@ -1607,6 +1607,40 @@ static int genphy_config_advert(struct phy_device *phydev) + return changed; + } + ++/** ++ * genphy_c37_config_advert - sanitize and advertise auto-negotiation parameters ++ * @phydev: target phy_device struct ++ * ++ * Description: Writes MII_ADVERTISE with the appropriate values, ++ * after sanitizing the values to make sure we only advertise ++ * what is supported. Returns < 0 on error, 0 if the PHY's advertisement ++ * hasn't changed, and > 0 if it has changed. This function is intended ++ * for Clause 37 1000Base-X mode. ++ */ ++static int genphy_c37_config_advert(struct phy_device *phydev) ++{ ++ u16 adv = 0; ++ ++ /* Only allow advertising what this PHY supports */ ++ linkmode_and(phydev->advertising, phydev->advertising, ++ phydev->supported); ++ ++ if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, ++ phydev->advertising)) ++ adv |= ADVERTISE_1000XFULL; ++ if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, ++ phydev->advertising)) ++ adv |= ADVERTISE_1000XPAUSE; ++ if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, ++ phydev->advertising)) ++ adv |= ADVERTISE_1000XPSE_ASYM; ++ ++ return phy_modify_changed(phydev, MII_ADVERTISE, ++ ADVERTISE_1000XFULL | ADVERTISE_1000XPAUSE | ++ ADVERTISE_1000XHALF | ADVERTISE_1000XPSE_ASYM, ++ adv); ++} ++ + /** + * genphy_config_eee_advert - disable unwanted eee mode advertisement + * @phydev: target phy_device struct +@@ -1715,6 +1749,54 @@ int __genphy_config_aneg(struct phy_device *phydev, bool changed) + } + EXPORT_SYMBOL(__genphy_config_aneg); + ++/** ++ * genphy_c37_config_aneg - restart auto-negotiation or write BMCR ++ * @phydev: target phy_device struct ++ * ++ * Description: If auto-negotiation is enabled, we configure the ++ * advertising, and then restart auto-negotiation. If it is not ++ * enabled, then we write the BMCR. This function is intended ++ * for use with Clause 37 1000Base-X mode. ++ */ ++int genphy_c37_config_aneg(struct phy_device *phydev) ++{ ++ int err, changed; ++ ++ if (phydev->autoneg != AUTONEG_ENABLE) ++ return genphy_setup_forced(phydev); ++ ++ err = phy_modify(phydev, MII_BMCR, BMCR_SPEED1000 | BMCR_SPEED100, ++ BMCR_SPEED1000); ++ if (err) ++ return err; ++ ++ changed = genphy_c37_config_advert(phydev); ++ if (changed < 0) /* error */ ++ return changed; ++ ++ if (!changed) { ++ /* Advertisement hasn't changed, but maybe aneg was never on to ++ * begin with? Or maybe phy was isolated? ++ */ ++ int ctl = phy_read(phydev, MII_BMCR); ++ ++ if (ctl < 0) ++ return ctl; ++ ++ if (!(ctl & BMCR_ANENABLE) || (ctl & BMCR_ISOLATE)) ++ changed = 1; /* do restart aneg */ ++ } ++ ++ /* Only restart aneg if we are advertising something different ++ * than we were before. ++ */ ++ if (changed > 0) ++ return genphy_restart_aneg(phydev); ++ ++ return 0; ++} ++EXPORT_SYMBOL(genphy_c37_config_aneg); ++ + /** + * genphy_aneg_done - return auto-negotiation status + * @phydev: target phy_device struct +@@ -1886,6 +1968,63 @@ int genphy_read_status(struct phy_device *phydev) + } + EXPORT_SYMBOL(genphy_read_status); + ++/** ++ * genphy_c37_read_status - check the link status and update current link state ++ * @phydev: target phy_device struct ++ * ++ * Description: Check the link, then figure out the current state ++ * by comparing what we advertise with what the link partner ++ * advertises. This function is for Clause 37 1000Base-X mode. ++ */ ++int genphy_c37_read_status(struct phy_device *phydev) ++{ ++ int lpa, err, old_link = phydev->link; ++ ++ /* Update the link, but return if there was an error */ ++ err = genphy_update_link(phydev); ++ if (err) ++ return err; ++ ++ /* why bother the PHY if nothing can have changed */ ++ if (phydev->autoneg == AUTONEG_ENABLE && old_link && phydev->link) ++ return 0; ++ ++ phydev->duplex = DUPLEX_UNKNOWN; ++ phydev->pause = 0; ++ phydev->asym_pause = 0; ++ ++ if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete) { ++ lpa = phy_read(phydev, MII_LPA); ++ if (lpa < 0) ++ return lpa; ++ ++ linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, ++ phydev->lp_advertising, lpa & LPA_LPACK); ++ linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, ++ phydev->lp_advertising, lpa & LPA_1000XFULL); ++ linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT, ++ phydev->lp_advertising, lpa & LPA_1000XPAUSE); ++ linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, ++ phydev->lp_advertising, ++ lpa & LPA_1000XPAUSE_ASYM); ++ ++ phy_resolve_aneg_linkmode(phydev); ++ } else if (phydev->autoneg == AUTONEG_DISABLE) { ++ int bmcr = phy_read(phydev, MII_BMCR); ++ ++ if (bmcr < 0) ++ return bmcr; ++ ++ if (bmcr & BMCR_FULLDPLX) ++ phydev->duplex = DUPLEX_FULL; ++ else ++ phydev->duplex = DUPLEX_HALF; ++ } ++ ++ return 0; ++} ++EXPORT_SYMBOL(genphy_c37_read_status); ++ + /** + * genphy_soft_reset - software reset the PHY via BMCR_RESET bit + * @phydev: target phy_device struct +diff --git a/include/linux/phy.h b/include/linux/phy.h +index 9a0e981df502..78436d58ce7c 100644 +--- a/include/linux/phy.h ++++ b/include/linux/phy.h +@@ -1106,6 +1106,10 @@ int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, + int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum, + u16 regnum, u16 val); + ++/* Clause 37 */ ++int genphy_c37_config_aneg(struct phy_device *phydev); ++int genphy_c37_read_status(struct phy_device *phydev); ++ + /* Clause 45 PHY */ + int genphy_c45_restart_aneg(struct phy_device *phydev); + int genphy_c45_check_and_restart_aneg(struct phy_device *phydev, bool restart); From 6d924706a65a16f88bae7f2b3d29535df5b320ab Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Wed, 11 Mar 2020 01:30:02 +0800 Subject: [PATCH 05/30] ramips: phy: at803x: support RGMII-to-SerDes and SFP support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: DENG Qingfang Signed-off-by: René van Dorst --- .../linux/ramips/patches-5.4/991-at803x.patch | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 target/linux/ramips/patches-5.4/991-at803x.patch diff --git a/target/linux/ramips/patches-5.4/991-at803x.patch b/target/linux/ramips/patches-5.4/991-at803x.patch new file mode 100644 index 0000000000..60afe2a35f --- /dev/null +++ b/target/linux/ramips/patches-5.4/991-at803x.patch @@ -0,0 +1,141 @@ +From 60ae82b0ea56c279be384b99cd2a42ae5ba7c5c7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= +Date: Mon, 4 Nov 2019 22:22:17 +0100 +Subject: [PATCH] net: phy: at803x: add support for SFP module in + RGMII-to-x-base mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: René van Dorst +--- + drivers/net/phy/at803x.c | 74 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + +diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c +index 481cf48c9b9e4..a6536ecf15db4 100644 +--- a/drivers/net/phy/at803x.c ++++ b/drivers/net/phy/at803x.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #define AT803X_SPECIFIC_STATUS 0x11 + #define AT803X_SS_SPEED_MASK (3 << 14) +@@ -57,9 +58,18 @@ + + #define AT803X_MODE_CFG_MASK 0x0F + #define AT803X_MODE_CFG_SGMII 0x01 ++#define AT803X_MODE_CFG_BX1000_RGMII_50 0x02 ++#define AT803X_MODE_CFG_BX1000_RGMII_75 0x03 ++#define AT803X_MODE_FIBER 0x01 ++#define AT803X_MODE_COPPER 0x00 + + #define AT803X_PSSR 0x11 /*PHY-Specific Status Register*/ + #define AT803X_PSSR_MR_AN_COMPLETE 0x0200 ++#define PSSR_LINK BIT(10) ++#define PSSR_SYNC_STATUS BIT(8) ++#define PSSR_DUPLEX BIT(13) ++#define PSSR_SPEED_1000 BIT(15) ++#define PSSR_SPEED_100 BIT(14) + + #define AT803X_DEBUG_REG_0 0x00 + #define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15) +@@ -475,10 +485,56 @@ static int at803x_parse_dt(struct phy_device *phydev) + return 0; + } + ++static int at803x_mode(struct phy_device *phydev) ++{ ++ int mode; ++ ++ mode = phy_read(phydev, AT803X_REG_CHIP_CONFIG) & AT803X_MODE_CFG_MASK; ++ ++ if (mode == AT803X_MODE_CFG_BX1000_RGMII_50 || ++ mode == AT803X_MODE_CFG_BX1000_RGMII_75) ++ return AT803X_MODE_FIBER; ++ return AT803X_MODE_COPPER; ++} ++ ++static int at803x_sfp_insert(void *upstream, const struct sfp_eeprom_id *id) ++{ ++ struct phy_device *phydev = upstream; ++ __ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, }; ++ phy_interface_t iface; ++ ++ sfp_parse_support(phydev->sfp_bus, id, support); ++ iface = sfp_select_interface(phydev->sfp_bus, support); ++ ++ if (iface != PHY_INTERFACE_MODE_SGMII && ++ iface != PHY_INTERFACE_MODE_1000BASEX) { ++ dev_info(&phydev->mdio.dev, "incompatible SFP module inserted;" ++ "Only SGMII/1000BASEX are supported!\n"); ++ return -EINVAL; ++ } ++ ++ dev_info(&phydev->mdio.dev, "SFP interface %s", phy_modes(iface)); ++ ++ return 0; ++} ++ ++static const struct sfp_upstream_ops at803x_sfp_ops = { ++ .attach = phy_sfp_attach, ++ .detach = phy_sfp_detach, ++ .module_insert = at803x_sfp_insert, ++}; ++ + static int at803x_probe(struct phy_device *phydev) + { + struct device *dev = &phydev->mdio.dev; + struct at803x_priv *priv; ++ int ret; ++ ++ if (at803x_mode(phydev) == AT803X_MODE_FIBER) { ++ ret = phy_sfp_probe(phydev, &at803x_sfp_ops); ++ if (ret < 0) ++ return ret; ++ } + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) +@@ -658,6 +714,10 @@ static int at803x_read_status(struct phy_device *phydev) + { + int ss, err, old_link = phydev->link; + ++ /* Handle (Fiber) SGMII to RGMII mode */ ++ if (at803x_mode(phydev) == AT803X_MODE_FIBER) ++ return genphy_c37_read_status(phydev); ++ + /* Update the link, but return if there was an error */ + err = genphy_update_link(phydev); + if (err) +@@ -712,6 +772,19 @@ static int at803x_read_status(struct phy_device *phydev) + return 0; + } + ++static int at803x_config_aneg(struct phy_device *phydev) ++{ ++ /* Handle (Fiber) SerDes to RGMII mode */ ++ if (at803x_mode(phydev) == AT803X_MODE_FIBER) { ++ pr_warn("%s: fiber\n", __func__); ++ return genphy_c37_config_aneg(phydev); ++ } ++ ++ pr_warn("%s: enter\n", __func__); ++ ++ return genphy_config_aneg(phydev); ++} ++ + static struct phy_driver at803x_driver[] = { + { + /* Qualcomm Atheros AR8035 */ +@@ -758,6 +831,7 @@ static struct phy_driver at803x_driver[] = { + .suspend = at803x_suspend, + .resume = at803x_resume, + /* PHY_GBIT_FEATURES */ ++ .config_aneg = at803x_config_aneg, + .read_status = at803x_read_status, + .aneg_done = at803x_aneg_done, + .ack_interrupt = &at803x_ack_interrupt, From ec2f7a47d379c3828eec930df881b09acc6fec06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= Date: Tue, 7 Apr 2020 23:50:31 +0200 Subject: [PATCH 06/30] kernel: add module to support SFP cages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enables kernel SFP case support. Signed-off-by: René van Dorst --- package/kernel/linux/modules/netdevices.mk | 20 ++++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index bb92447780..81b23f98df 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1141,3 +1141,23 @@ define KernelPackage/mlx5-core/description endef $(eval $(call KernelPackage,mlx5-core)) + + +define KernelPackage/sfp + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=SFP cage support + DEPENDS:=+kmod-i2c-core +kmod-hwmon-core + KCONFIG:= \ + CONFIG_SFP=m \ + CONFIG_MDIO_I2C=m + FILES:= \ + $(LINUX_DIR)/drivers/net/phy/sfp.ko \ + $(LINUX_DIR)/drivers/net/phy/mdio-i2c.ko + AUTOLOAD:=$(call AutoProbe,mdio-i2c sfp) +endef + +define KernelPackage/SFP/description + Kernel module to support SFP cages +endef + +$(eval $(call KernelPackage,sfp)) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 739655f837..d5527cd98d 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -820,7 +820,7 @@ TARGET_DEVICES += ubnt_edgerouter-x define Device/ubnt_edgerouter-x-sfp $(Device/ubnt_edgerouter_common) DEVICE_MODEL := EdgeRouter X SFP - DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x + DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-sfp SUPPORTED_DEVICES += ubnt-erx-sfp ubiquiti,edgerouterx-sfp endef TARGET_DEVICES += ubnt_edgerouter-x-sfp From 4c70bb4f906b875aee1da6636aa7d2023ef69064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= Date: Wed, 11 Mar 2020 01:34:33 +0800 Subject: [PATCH 07/30] ramips: enable SFP port for Ubiquiti ER-X-SFP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SFP cage of this device is connected via a AT8031 phy to port 5 of the switch. This phy act as a RGMII-to-SerDes converter. Also a I2C clock gate needs to be enabled in order to access the SFP module via I2C bus. SFP cage also has module detect pin which is connected to I2C gpio expander. With this patch the kernel/PHYLINK now can detect, readout and use the SFP module/port. NOTE: SFP cage / AT8033 PHY only support 1000base-X encoding! This means that some SGMII modules can work and only at forced 1GBit/full-duplex! Signed-off-by: René van Dorst --- .../dts/mt7621_ubnt_edgerouter-x-sfp.dts | 60 ++++++++++++++++++- .../mt7621/base-files/etc/board.d/02_network | 6 +- target/linux/ramips/mt7621/config-5.4 | 1 + 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts index 9515f1d8b5..0b58a78a50 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts @@ -5,13 +5,71 @@ / { model = "Ubiquiti EdgeRouter X SFP"; compatible = "ubnt,edgerouter-x-sfp", "mediatek,mt7621-soc"; + + sfp_eth5: sfp_eth5 { + compatible = "sff,sfp"; + i2c-bus = <&i2c>; + mod-def0-gpio = <&expander0 5 GPIO_ACTIVE_LOW>; + maximum-power-milliwatt = <1000>; + }; }; &i2c { status = "okay"; - pca9555@25 { + /* + * PCA9655 GPIO expander + * 0-POE power port eth0 + * 1-POE power port eth1 + * 2-POE power port eth2 + * 3-POE power port eth3 + * 4-POE power port eth4 + * 5-SFP_MOD_DEF0# + * 6- + * 7- + * 8-Pull up to VCC + * 9-Pull down to GND + * 10-Pull down to GND + * 11-Pull down to GND + * 12-Pull down to GND + * 13-Pull down to GND + * 14-Pull down to GND + * 15-Pull down to GND + */ + expander0: pca9555@25 { compatible = "nxp,pca9555"; + interrupt-parent = <&gpio>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + gpio-controller; + #gpio-cells = <2>; reg = <0x25>; }; }; + +&gpio { + sfp_i2c_clk_gate { + gpio-hog; + gpios = <7 GPIO_ACTIVE_LOW>; + output-high; + }; +}; + +&mdio { + ephy7: ethernet-phy@7 { + reg = <7>; + sfp = <&sfp_eth5>; + }; +}; + +&switch0 { + ports { + port@5 { + reg = <5>; + label = "eth5"; + phy-handle = <&ephy7>; + phy-mode = "rgmii-rxid"; + mtd-mac-address = <&factory 0x22>; + mtd-mac-address-increment = <5>; + }; + }; +}; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 252f9f1dda..952146478c 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -42,10 +42,12 @@ ramips_setup_interfaces() mikrotik,routerboard-750gr3) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan" ;; - ubnt,edgerouter-x|\ - ubnt,edgerouter-x-sfp) + ubnt,edgerouter-x) ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4" ;; + ubnt,edgerouter-x-sfp) + ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4 eth5" + ;; *) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; diff --git a/target/linux/ramips/mt7621/config-5.4 b/target/linux/ramips/mt7621/config-5.4 index e91003d8d2..fda295a93f 100644 --- a/target/linux/ramips/mt7621/config-5.4 +++ b/target/linux/ramips/mt7621/config-5.4 @@ -19,6 +19,7 @@ CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_AT803X_PHY=y CONFIG_BLK_MQ_PCI=y CONFIG_BOARD_SCACHE=y CONFIG_BOUNCE=y From b23f72b5b615b31b348c4a3259a0d85d127487f0 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 26 Apr 2020 11:02:16 +0200 Subject: [PATCH 08/30] kernel: netdev: add kmod-phylink Signed-off-by: David Bauer --- package/kernel/linux/modules/netdevices.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 81b23f98df..012017425a 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -107,6 +107,22 @@ endef $(eval $(call KernelPackage,libphy)) + +define KernelPackage/phylink + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Model for MAC to optional PHY connection + KCONFIG:=CONFIG_PHYLINK + FILES:=$(LINUX_DIR)/drivers/net/phy/phylink.ko + AUTOLOAD:=$(call AutoLoad,15,phylink,1) +endef + +define KernelPackage/phylink/description + Model for MAC to optional PHY connection +endef + +$(eval $(call KernelPackage,phylink)) + + define KernelPackage/mii SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=MII library From 71d5a0d92ba8599924b607501cd1a90d9d4fabee Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 26 Apr 2020 11:13:53 +0200 Subject: [PATCH 09/30] kernel: netdev: add phylink dependency for sfp Fixes: ec2f7a47d379 ("kernel: add module to support SFP cages") Signed-off-by: David Bauer --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 012017425a..7b6fe1ce12 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1162,7 +1162,7 @@ $(eval $(call KernelPackage,mlx5-core)) define KernelPackage/sfp SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=SFP cage support - DEPENDS:=+kmod-i2c-core +kmod-hwmon-core + DEPENDS:=+kmod-i2c-core +kmod-hwmon-core +kmod-phylink KCONFIG:= \ CONFIG_SFP=m \ CONFIG_MDIO_I2C=m From b359a6b948a6e25682ef5b6e82d2df8448b37c94 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 26 Apr 2020 12:07:46 +0200 Subject: [PATCH 10/30] kernel: netdev: fix kmod-sfp description capitalization Signed-off-by: David Bauer --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 7b6fe1ce12..16e7215c60 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1172,7 +1172,7 @@ define KernelPackage/sfp AUTOLOAD:=$(call AutoProbe,mdio-i2c sfp) endef -define KernelPackage/SFP/description +define KernelPackage/sfp/description Kernel module to support SFP cages endef From 97d86426e2ec4e6a875f82aa6e0ffdb802fbde22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Sat, 25 Apr 2020 12:47:43 +0200 Subject: [PATCH 11/30] x86: fix unusable squashfs images by adding missing padding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was reported, that after image generation rework x86-64-generic-squashfs-rootfs.img image won't boot on XenServer x86_64 anymore: F2FS-fs (xvda): Magic Mismatch, valid(0xf2f52010) - read(0x84289960) F2FS-fs (xvda): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (xvda): Magic Mismatch, valid(0xf2f52010) - read(0x4e8ee223) F2FS-fs (xvda): Can't find valid F2FS filesystem in 2th superblock List of all partitions: ca00 4207 xvda driver: vbd No filesystem could mount root, tried: ext3 ext2 ext4 squashfs iso9660 f2fs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(202,0) So lets fix this by adding back padding which was introduced in commit a17d9482f5e2 ("x86: image: fix small disk space in squashfs overlay"). Ref: FS#3036 Fixes: 258f070d1a4f ("x86: fix missing squashfs and ext4 rootfs images") Fixes: cb007a7bf619 ("x86: switch image generation to new code") Signed-off-by: Petr Štetiar --- target/linux/x86/image/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index 72a4d66ad7..174c272a51 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -111,8 +111,8 @@ define Device/Default IMAGE/combined.img.gz := grub-config pc | combined | grub-install | gzip | append-metadata IMAGE/combined.vdi := grub-config pc | combined | grub-install | qemu-image vdi IMAGE/combined.vmdk := grub-config pc | combined | grub-install | qemu-image vmdk - IMAGE/rootfs.img := append-rootfs - IMAGE/rootfs.img.gz := append-rootfs | gzip + IMAGE/rootfs.img := append-rootfs | pad-to $(ROOTFS_PARTSIZE) + IMAGE/rootfs.img.gz := append-rootfs | pad-to $(ROOTFS_PARTSIZE) | gzip ARTIFACT/image-efi.iso := grub-config iso | iso efi IMAGE/combined-efi.img := grub-config efi | combined efi | grub-install efi | append-metadata IMAGE/combined-efi.img.gz := grub-config efi | combined efi | grub-install efi | gzip | append-metadata From 9f7c8ed0786be97eda879e5f6681994e4de53d74 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Sat, 25 Apr 2020 10:30:08 +0100 Subject: [PATCH 12/30] umdns: update to version 2020-04-25 cdac046 dns.c: fix input validation fix Due to a slight foobar typo, failing to de-reference a pointer, previous fix not quite as complete as it should have been. Improve CVE-2020-11750 fix Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/umdns/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile index 3b025f5437..6bf11248d6 100644 --- a/package/network/services/umdns/Makefile +++ b/package/network/services/umdns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-04-20 -PKG_SOURCE_VERSION:=e74a3f9883199e9db7220d52b78e5fbdb4441ca3 -PKG_MIRROR_HASH:=a54410a6407c3dad985c94e3ca6f9c2bb5786876c9545cf65a56e4dfc2b380ff +PKG_SOURCE_DATE:=2020-04-25 +PKG_SOURCE_VERSION:=cdac0460ba50dc45735f0be2e19a5a8efc3dafe1 +PKG_MIRROR_HASH:=261cb929dfc03c1f293156cfdec8c2cd1541dcdc57ae42a323f9df5d26e6f7d2 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=LGPL-2.1 From 9e7d11f3e275d6f5d6b3edd7f0fa0440da43c45a Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Sat, 25 Apr 2020 10:27:22 +0100 Subject: [PATCH 13/30] relayd: bump to version 2020-04-25 f4d759b dhcp.c: further improve validation Further improve input validation for CVE-2020-11752 Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/relayd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/relayd/Makefile b/package/network/services/relayd/Makefile index b178f50db1..64a08a9665 100644 --- a/package/network/services/relayd/Makefile +++ b/package/network/services/relayd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(PROJECT_GIT)/project/relayd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-04-20 -PKG_SOURCE_VERSION:=ad0b25ad74345d367c62311e14b279f5ccb8ef13 -PKG_MIRROR_HASH:=e3e3598e5d37ea225db153288726036c5164bfc98e46d76ad8c317cc19b25a22 +PKG_SOURCE_DATE:=2020-04-25 +PKG_SOURCE_VERSION:=f4d759be54ceb37714e9a6ca320d5b50c95e9ce9 +PKG_MIRROR_HASH:=b1ff6e99072867be0975ba0be52ba9da3a876c8b8da893d68301e8238243a51e PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From 822c342d09e20e04677841730755c06c8d6efdfa Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 26 Apr 2020 13:37:42 +0200 Subject: [PATCH 14/30] kernel: netdev: fix kmod-sfp symbols Fixes: ec2f7a47d379 ("kernel: add module to support SFP cages") Signed-off-by: David Bauer --- package/kernel/linux/modules/netdevices.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 16e7215c60..26a22e9007 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1164,8 +1164,8 @@ define KernelPackage/sfp TITLE:=SFP cage support DEPENDS:=+kmod-i2c-core +kmod-hwmon-core +kmod-phylink KCONFIG:= \ - CONFIG_SFP=m \ - CONFIG_MDIO_I2C=m + CONFIG_SFP \ + CONFIG_MDIO_I2C FILES:= \ $(LINUX_DIR)/drivers/net/phy/sfp.ko \ $(LINUX_DIR)/drivers/net/phy/mdio-i2c.ko From 01961f163d927d6b44097f48a67bbc5b4c63eaf7 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Mon, 23 Mar 2020 02:41:08 +0900 Subject: [PATCH 15/30] oxnas: move service file to correct place This service file has been misplaced from the very beginning. Fixes: dcc34574efba ("oxnas: bring in new oxnas target") Signed-off-by: Sungbo Eo --- target/linux/oxnas/base-files/{ => etc}/init.d/set-irq-affinity | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename target/linux/oxnas/base-files/{ => etc}/init.d/set-irq-affinity (100%) diff --git a/target/linux/oxnas/base-files/init.d/set-irq-affinity b/target/linux/oxnas/base-files/etc/init.d/set-irq-affinity similarity index 100% rename from target/linux/oxnas/base-files/init.d/set-irq-affinity rename to target/linux/oxnas/base-files/etc/init.d/set-irq-affinity From d16a4867669acd470b936620dba8fda86bc6400b Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Sun, 26 Apr 2020 19:55:06 +0900 Subject: [PATCH 16/30] ramips: fix SUPPORTED_DEVICES for Mercury MAC1200R v2 Currently SUPPORTED_DEVICES only contains the old device string. Fix it by removing the first assignment. Fixes: c2334ad60dc8 ("ramips/mt76x8: Synchronize Makefiles with DTS compatible") Signed-off-by: Sungbo Eo --- target/linux/ramips/image/mt76x8.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 76fcab8787..7700265a33 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -161,7 +161,6 @@ define Device/mercury_mac1200r-v2 DEVICE_VENDOR := Mercury DEVICE_MODEL := MAC1200R DEVICE_VARIANT := v2.0 - SUPPORTED_DEVICES := mac1200rv2 DEVICE_PACKAGES := kmod-mt76x2 SUPPORTED_DEVICES += mac1200rv2 endef From 1dedad2a00d8519d4892b8529b5f2fffcb768220 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Sun, 26 Apr 2020 20:22:33 +0900 Subject: [PATCH 17/30] ramips: remove unnecessary DEVICE_PACKAGES for Belkin F7C027 kmod-usb-dwc2 and kmod-usb-ledtrig-usbport are not target default packages, and Belkin F7C027 does not have a USB port anyway. Just drop it. Signed-off-by: Sungbo Eo --- target/linux/ramips/image/rt305x.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 1a9f17c710..70f7a2003d 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -298,7 +298,6 @@ define Device/belkin_f7c027 IMAGE_SIZE := 7616k DEVICE_VENDOR := Belkin DEVICE_MODEL := F7C027 - DEVICE_PACKAGES := --kmod-usb-dwc2 -kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += f7c027 endef TARGET_DEVICES += belkin_f7c027 From b0416c9c128f1c557f9314003105b0c9e4d37b36 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Thu, 16 Apr 2020 01:23:28 -0300 Subject: [PATCH 18/30] gdb: disable gdbserver for arc Although gdb is supported, gdbserver is still not. checking whether gdbserver is supported on this host... no Build breaks as gdbserver executable is not found during packaging. Signed-off-by: Luiz Angelo Daros de Luca --- package/devel/gdb/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index fd5ac7eb67..a2abf29f86 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -44,6 +44,7 @@ endef define Package/gdbserver $(call Package/gdb/Default) TITLE:=Remote server for GNU Debugger + DEPENDS=@!arc endef define Package/gdbserver/description From 80f128d2aa7586ce068bbc24badc46ffab2edd4a Mon Sep 17 00:00:00 2001 From: Yangbo Lu Date: Tue, 14 Apr 2020 15:24:50 +0800 Subject: [PATCH 19/30] perf: build with NO_LIBCAP=1 Build with NO_LIBCAP=1. This is to resolve build issue. Package perf is missing dependencies for the following libraries: libcap.so.2 Signed-off-by: Yangbo Lu --- package/devel/perf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile index aa5fb16f60..aa478a0431 100644 --- a/package/devel/perf/Makefile +++ b/package/devel/perf/Makefile @@ -48,6 +48,7 @@ MAKE_FLAGS = \ NO_LIBAUDIT=1 \ NO_LIBCRYPTO=1 \ NO_LIBUNWIND=1 \ + NO_LIBCAP=1 \ CROSS_COMPILE="$(TARGET_CROSS)" \ CC="$(TARGET_CC)" \ LD="$(TARGET_CROSS)ld" \ From 066ec97167e49b5c037b04dc4ec76c4cad5b75e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Wed, 5 Feb 2020 20:10:43 +0100 Subject: [PATCH 20/30] mac80211: ath10k: increase rx buffer size to 2048 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before, only frames with a maximum size of 1528 bytes could be transmitted between two 802.11s nodes. For batman-adv for instance, which adds its own header to each frame, we typically need an MTU of at least 1532 bytes to be able to transmit without fragmentation. This patch now increases the maxmimum frame size from 1528 to 1656 bytes. Tested with two ath10k devices in 802.11s mode, as well as with batman-adv on top of 802.11s with forwarding disabled. Fix originally found and developed by Ben Greear. Link: https://github.com/greearb/ath10k-ct/issues/89 Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d Cc: Ben Greear Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann --- ...h10k-increase-rx-buffer-size-to-2048.patch | 37 +++++++++++++++++++ ...80211-use-more-bits-for-ack_frame_id.patch | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch diff --git a/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch new file mode 100644 index 0000000000..55429139fa --- /dev/null +++ b/package/kernel/mac80211/patches/ath/922-ath10k-increase-rx-buffer-size-to-2048.patch @@ -0,0 +1,37 @@ +From: Linus Lüssing +Date: Wed, 5 Feb 2020 20:10:43 +0100 +Subject: ath10k: increase rx buffer size to 2048 + +Before, only frames with a maximum size of 1528 bytes could be +transmitted between two 802.11s nodes. + +For batman-adv for instance, which adds its own header to each frame, +we typically need an MTU of at least 1532 bytes to be able to transmit +without fragmentation. + +This patch now increases the maxmimum frame size from 1528 to 1656 +bytes. + +Tested with two ath10k devices in 802.11s mode, as well as with +batman-adv on top of 802.11s with forwarding disabled. + +Fix originally found and developed by Ben Greear. + +Link: https://github.com/greearb/ath10k-ct/issues/89 +Link: https://github.com/greearb/ath10k-ct/commit/9e5ab25027e0971fa24ccf93373324c08c4e992d +Cc: Ben Greear +Signed-off-by: Linus Lüssing + +Forwarded: https://patchwork.kernel.org/patch/11367055/ + +--- a/drivers/net/wireless/ath/ath10k/htt.h ++++ b/drivers/net/wireless/ath/ath10k/htt.h +@@ -2219,7 +2219,7 @@ struct htt_rx_chan_info { + * Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size, + * rounded up to a cache line size. + */ +-#define HTT_RX_BUF_SIZE 1920 ++#define HTT_RX_BUF_SIZE 2048 + #define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc)) + + /* Refill a bunch of RX buffers for each refill round so that FW/HW can handle diff --git a/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch b/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch index 1511525aa4..a2fb9d4b10 100644 --- a/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch +++ b/package/kernel/mac80211/patches/subsys/353-mac80211-use-more-bits-for-ack_frame_id.patch @@ -59,7 +59,7 @@ Acked-by: Toke Høiland-Jørgensen if (id < 0) { --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -2452,7 +2452,7 @@ static int ieee80211_store_ack_skb(struc +@@ -2458,7 +2458,7 @@ static int ieee80211_store_ack_skb(struc spin_lock_irqsave(&local->ack_status_lock, flags); id = idr_alloc(&local->ack_status_frames, ack_skb, From 042917f1c4e8e68ed6c6948dcaf57d35d0b3c366 Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 19 Apr 2020 16:07:10 +0300 Subject: [PATCH 21/30] tools/mkimage: update to 2020.04 also change the download source to https and add a mirror drop merged patches Signed-off-by: Lucian Cristian [Add extra changes to compile on FreeBSD, merge two patches] Signed-off-by: Hauke Mehrtens --- tools/mkimage/Makefile | 9 +- .../030-allow-to-use-different-magic.patch | 2 +- ...d-compatibility-with-non-Linux-hosts.patch | 95 ++++++++ .../patches/050-image_h_portability.patch | 207 ------------------ .../patches/060-remove_kernel_includes.patch | 29 --- .../070-remove_generated_autoconf.patch | 10 + .../patches/210-link-libcrypto-static.patch | 2 +- 7 files changed, 113 insertions(+), 241 deletions(-) create mode 100644 tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch delete mode 100644 tools/mkimage/patches/050-image_h_portability.patch delete mode 100644 tools/mkimage/patches/060-remove_kernel_includes.patch create mode 100644 tools/mkimage/patches/070-remove_generated_autoconf.patch diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index dc1aec18a0..90ecdaaa6e 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -7,11 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mkimage -PKG_VERSION:=2019.07 +PKG_VERSION:=2020.04 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://ftp.denx.de/pub/u-boot -PKG_HASH:=bff4fa77e8da17521c030ca4c5b947a056c1b1be4d3e6ee8637020b8d50251d0 +PKG_SOURCE_URL:= \ + https://mirror.cyberbits.eu/u-boot \ + https://ftp.denx.de/pub/u-boot \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch index ce61cb0fb6..8d79de2992 100644 --- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch +++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch @@ -50,7 +50,7 @@ This patch makes it possible to set a custom image magic. break; --- a/tools/default_image.c +++ b/tools/default_image.c -@@ -116,7 +116,7 @@ static void image_set_header(void *ptr, +@@ -120,7 +120,7 @@ static void image_set_header(void *ptr, } /* Build new header */ diff --git a/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch b/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch new file mode 100644 index 0000000000..ea2e8e3da3 --- /dev/null +++ b/tools/mkimage/patches/050-Add-compatibility-with-non-Linux-hosts.patch @@ -0,0 +1,95 @@ +From 590b23a46b7ae0f5ec5e8f57a85c0e7578c71141 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 26 Apr 2020 17:15:17 +0200 +Subject: [PATCH 1/2] Add compatibility with non Linux hosts + +This adds some changes to the u-boot tools to make it possible to build +them on non Linux hosts like MacOS or FreeBSD. + +asm/byteorder.h, asm/posix_types.h, asm/types.h and linux/kernel.h are +not available on such systems. Remove the include and add the necessary +parts for these header files manually or remove the usage too. + +__u64 is not available on FreeBSD, remove its usage. + + has been replaced by + +Signed-off-by: Hauke Mehrtens +--- + include/image.h | 2 ++ + include/imx8image.h | 5 +++++ + include/linux/posix_types.h | 2 ++ + include/linux/types.h | 4 +++- + lib/rsa/rsa-sign.c | 2 +- + 5 files changed, 13 insertions(+), 2 deletions(-) + +--- a/include/image.h ++++ b/include/image.h +@@ -16,7 +16,9 @@ + #define __IMAGE_H__ + + #include "compiler.h" ++#ifdef linux + #include ++#endif + #include + + /* Define this to avoid #ifdefs later on */ +--- a/include/imx8image.h ++++ b/include/imx8image.h +@@ -11,7 +11,12 @@ + #include + #include + #include "imagetool.h" ++#ifdef linux + #include "linux/kernel.h" ++#else ++#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) ++#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) ++#endif + + #define __packed __attribute__((packed)) + +--- a/include/linux/posix_types.h ++++ b/include/linux/posix_types.h +@@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in + /* Type of a SYSV IPC key. */ + typedef int __kernel_key_t; + ++#ifdef linux + #include ++#endif + + #endif /* _LINUX_POSIX_TYPES_H */ +--- a/include/linux/types.h ++++ b/include/linux/types.h +@@ -2,7 +2,9 @@ + #define _LINUX_TYPES_H + + #include ++#ifdef linux + #include ++#endif + #include + + #ifndef __KERNEL_STRICT_NAMES +@@ -142,7 +144,7 @@ typedef __u16 __bitwise __le16; + typedef __u16 __bitwise __be16; + typedef __u32 __bitwise __le32; + typedef __u32 __bitwise __be32; +-#if defined(__GNUC__) ++#if defined(__GNUC__) && defined(linux) + typedef __u64 __bitwise __le64; + typedef __u64 __bitwise __be64; + #endif +--- a/lib/rsa/rsa-sign.c ++++ b/lib/rsa/rsa-sign.c +@@ -4,7 +4,7 @@ + */ + + #include "mkimage.h" +-#include ++#include + #include + #include + #include diff --git a/tools/mkimage/patches/050-image_h_portability.patch b/tools/mkimage/patches/050-image_h_portability.patch deleted file mode 100644 index 5b47f80cbb..0000000000 --- a/tools/mkimage/patches/050-image_h_portability.patch +++ /dev/null @@ -1,207 +0,0 @@ -Some of the Linux header files are not available on non Linux host -systems like FreeBSD or MacOSX. - -The __le32 and __be32 types are only defined in Linux in -asm/byteorder.h, but not on all other BSD systems. -Use uint32_t instead of __le32 and __be32. - -__swab32 is also a Linux only function, it looks like be32_to_cpu() -would be better here anyway. - ---- a/include/image.h -+++ b/include/image.h -@@ -16,7 +16,6 @@ - #define __IMAGE_H__ - - #include "compiler.h" --#include - #include - - /* Define this to avoid #ifdefs later on */ -@@ -317,13 +316,13 @@ enum { - * all data in network byte order (aka natural aka bigendian). - */ - typedef struct image_header { -- __be32 ih_magic; /* Image Header Magic Number */ -- __be32 ih_hcrc; /* Image Header CRC Checksum */ -- __be32 ih_time; /* Image Creation Timestamp */ -- __be32 ih_size; /* Image Data Size */ -- __be32 ih_load; /* Data Load Address */ -- __be32 ih_ep; /* Entry Point Address */ -- __be32 ih_dcrc; /* Image Data CRC Checksum */ -+ uint32_t ih_magic; /* Image Header Magic Number */ -+ uint32_t ih_hcrc; /* Image Header CRC Checksum */ -+ uint32_t ih_time; /* Image Creation Timestamp */ -+ uint32_t ih_size; /* Image Data Size */ -+ uint32_t ih_load; /* Data Load Address */ -+ uint32_t ih_ep; /* Entry Point Address */ -+ uint32_t ih_dcrc; /* Image Data CRC Checksum */ - uint8_t ih_os; /* Operating System */ - uint8_t ih_arch; /* CPU architecture */ - uint8_t ih_type; /* Image Type */ ---- a/tools/mtk_image.h -+++ b/tools/mtk_image.h -@@ -15,8 +15,8 @@ - union gen_boot_header { - struct { - char name[12]; -- __le32 version; -- __le32 size; -+ uint32_t version; -+ uint32_t size; - }; - - uint8_t pad[0x200]; -@@ -32,14 +32,14 @@ union nand_boot_header { - char name[12]; - char version[4]; - char id[8]; -- __le16 ioif; -- __le16 pagesize; -- __le16 addrcycles; -- __le16 oobsize; -- __le16 pages_of_block; -- __le16 numblocks; -- __le16 writesize_shift; -- __le16 erasesize_shift; -+ uint16_t ioif; -+ uint16_t pagesize; -+ uint16_t addrcycles; -+ uint16_t oobsize; -+ uint16_t pages_of_block; -+ uint16_t numblocks; -+ uint16_t writesize_shift; -+ uint16_t erasesize_shift; - uint8_t dummy[60]; - uint8_t ecc_parity[28]; - }; -@@ -54,14 +54,14 @@ union nand_boot_header { - /* BootROM layout header */ - struct brom_layout_header { - char name[8]; -- __le32 version; -- __le32 header_size; -- __le32 total_size; -- __le32 magic; -- __le32 type; -- __le32 header_size_2; -- __le32 total_size_2; -- __le32 unused; -+ uint32_t version; -+ uint32_t header_size; -+ uint32_t total_size; -+ uint32_t magic; -+ uint32_t type; -+ uint32_t header_size_2; -+ uint32_t total_size_2; -+ uint32_t unused; - }; - - #define BRLYT_NAME "BRLYT" -@@ -90,8 +90,8 @@ struct gen_device_header { - struct gfh_common_header { - uint8_t magic[3]; - uint8_t version; -- __le16 size; -- __le16 type; -+ uint16_t size; -+ uint16_t type; - }; - - #define GFH_HEADER_MAGIC "MMM" -@@ -106,17 +106,17 @@ struct gfh_common_header { - struct gfh_file_info { - struct gfh_common_header gfh; - char name[12]; -- __le32 unused; -- __le16 file_type; -+ uint32_t unused; -+ uint16_t file_type; - uint8_t flash_type; - uint8_t sig_type; -- __le32 load_addr; -- __le32 total_size; -- __le32 max_size; -- __le32 hdr_size; -- __le32 sig_size; -- __le32 jump_offset; -- __le32 processed; -+ uint32_t load_addr; -+ uint32_t total_size; -+ uint32_t max_size; -+ uint32_t hdr_size; -+ uint32_t sig_size; -+ uint32_t jump_offset; -+ uint32_t processed; - }; - - #define GFH_FILE_INFO_NAME "FILE_INFO" -@@ -129,16 +129,16 @@ struct gfh_file_info { - - struct gfh_bl_info { - struct gfh_common_header gfh; -- __le32 attr; -+ uint32_t attr; - }; - - struct gfh_brom_cfg { - struct gfh_common_header gfh; -- __le32 cfg_bits; -- __le32 usbdl_by_auto_detect_timeout_ms; -+ uint32_t cfg_bits; -+ uint32_t usbdl_by_auto_detect_timeout_ms; - uint8_t unused[0x48]; -- __le32 usbdl_by_kcol0_timeout_ms; -- __le32 usbdl_by_flag_timeout_ms; -+ uint32_t usbdl_by_kcol0_timeout_ms; -+ uint32_t usbdl_by_flag_timeout_ms; - uint32_t pad; - }; - -@@ -157,15 +157,15 @@ struct gfh_anti_clone { - uint8_t ac_b2k; - uint8_t ac_b2c; - uint16_t pad; -- __le32 ac_offset; -- __le32 ac_len; -+ uint32_t ac_offset; -+ uint32_t ac_len; - }; - - struct gfh_brom_sec_cfg { - struct gfh_common_header gfh; -- __le32 cfg_bits; -+ uint32_t cfg_bits; - char customer_name[0x20]; -- __le32 pad; -+ uint32_t pad; - }; - - #define BROM_SEC_CFG_JTAG_EN 1 -@@ -184,11 +184,11 @@ struct gfh_header { - - union lk_hdr { - struct { -- __le32 magic; -- __le32 size; -+ uint32_t magic; -+ uint32_t size; - char name[32]; -- __le32 loadaddr; -- __le32 mode; -+ uint32_t loadaddr; -+ uint32_t mode; - }; - - uint8_t data[512]; ---- a/tools/zynqmpbif.c -+++ b/tools/zynqmpbif.c -@@ -517,7 +517,7 @@ static int bif_add_bit(struct bif_entry - debug("Bitstream Length: 0x%x\n", bitlen); - for (i = 0; i < bitlen; i += sizeof(uint32_t)) { - uint32_t *bitbin32 = (uint32_t *)&bitbin[i]; -- *bitbin32 = __swab32(*bitbin32); -+ *bitbin32 = be32_to_cpu(*bitbin32); - } - - if (!bf->dest_dev) diff --git a/tools/mkimage/patches/060-remove_kernel_includes.patch b/tools/mkimage/patches/060-remove_kernel_includes.patch deleted file mode 100644 index 8917ec0863..0000000000 --- a/tools/mkimage/patches/060-remove_kernel_includes.patch +++ /dev/null @@ -1,29 +0,0 @@ -The Kernel includes are only available on Linux hosts, remove then on -non Linux hosts. - ---- a/include/linux/posix_types.h -+++ b/include/linux/posix_types.h -@@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in - /* Type of a SYSV IPC key. */ - typedef int __kernel_key_t; - -+#ifdef linux - #include -+#endif - - #endif /* _LINUX_POSIX_TYPES_H */ ---- a/include/imx8image.h -+++ b/include/imx8image.h -@@ -11,7 +11,12 @@ - #include - #include - #include "imagetool.h" -+#ifdef linux - #include "linux/kernel.h" -+#else -+#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) -+#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) -+#endif - - #define __packed __attribute__((packed)) - diff --git a/tools/mkimage/patches/070-remove_generated_autoconf.patch b/tools/mkimage/patches/070-remove_generated_autoconf.patch new file mode 100644 index 0000000000..7dcc8b64c1 --- /dev/null +++ b/tools/mkimage/patches/070-remove_generated_autoconf.patch @@ -0,0 +1,10 @@ +--- a/tools/imximage.c ++++ b/tools/imximage.c +@@ -11,7 +11,6 @@ + #include "imagetool.h" + #include + #include "imximage.h" +-#include + + #define UNDEFINED 0xFFFFFFFF + diff --git a/tools/mkimage/patches/210-link-libcrypto-static.patch b/tools/mkimage/patches/210-link-libcrypto-static.patch index 368dea86c9..c609912be9 100644 --- a/tools/mkimage/patches/210-link-libcrypto-static.patch +++ b/tools/mkimage/patches/210-link-libcrypto-static.patch @@ -3,7 +3,7 @@ needed dependencies are added too. --- a/tools/Makefile +++ b/tools/Makefile -@@ -151,7 +151,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON +@@ -162,7 +162,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON HOSTCFLAGS_kwbimage.o += \ $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") HOSTLOADLIBES_mkimage += \ From 60712bd536a4fcb4335b152b2b3a3544ccdf1cd0 Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 19 Apr 2020 15:52:25 +0300 Subject: [PATCH 22/30] u-boot.mk: switch download to https ftp can cause problems on some networks switch primary download location to https and add another mirror Signed-off-by: Lucian Cristian --- include/u-boot.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/u-boot.mk b/include/u-boot.mk index 02e37d0f4c..ec9fb15b6c 100644 --- a/include/u-boot.mk +++ b/include/u-boot.mk @@ -3,7 +3,8 @@ PKG_NAME ?= u-boot ifndef PKG_SOURCE_PROTO PKG_SOURCE = $(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL = \ - https://sources.openwrt.org \ + https://mirror.cyberbits.eu/u-boot \ + https://ftp.denx.de/pub/u-boot \ ftp://ftp.denx.de/pub/u-boot endif From b397df51aac42db3ebbf3cb9cb2db78c902803de Mon Sep 17 00:00:00 2001 From: Lucian Cristian Date: Sun, 19 Apr 2020 01:39:08 +0300 Subject: [PATCH 23/30] uboot-envtools: update to 2020.04 also revert to directly download the archive from https Signed-off-by: Lucian Cristian --- package/boot/uboot-envtools/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 49d57e69bd..b032e07c37 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot -PKG_VERSION:=2019.07 -PKG_RELEASE:=3 +PKG_VERSION:=2020.04 +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:= \ + https://ftp.denx.de/pub/u-boot \ + https://mirror.cyberbits.eu/u-boot \ + ftp://ftp.denx.de/pub/u-boot +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://git.denx.de/u-boot.git -PKG_SOURCE_VERSION:=e5aee22e4be75e75a854ab64503fc80598bc2004 -PKG_MIRROR_HASH:=58c1ecaf901b6bf65c5e872b5449b642694ae5acebf61f91f0d4bc20b4c654b7 PKG_BUILD_DEPENDS:=fstools From 75512fe0e76428e065c51d18dd41fd9857f7963c Mon Sep 17 00:00:00 2001 From: weidong jia Date: Fri, 10 Apr 2020 16:42:37 +0800 Subject: [PATCH 24/30] uboot-envtools: fix domywifi_dw33d Bad CRC error The current dw33d partition index has changed, this patch solves this problem. old partition layout dev: size erasesize name mtd0: 00040000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00fa0000 00010000 "oem-firmware" mtd3: 00010000 00010000 "art" mtd4: 00500000 00020000 "kernel" mtd5: 05b00000 00020000 "ubi" mtd6: 02000000 00020000 "oem-backup" new partition layout dev: size erasesize name mtd0: 00500000 00020000 "kernel" mtd1: 05b00000 00020000 "ubi" mtd2: 02000000 00020000 "oem-backup" mtd3: 00040000 00010000 "u-boot" mtd4: 00010000 00010000 "u-boot-env" mtd5: 00fa0000 00010000 "oem-firmware" mtd6: 00010000 00010000 "art" Signed-off-by: weidong jia --- package/boot/uboot-envtools/files/ath79 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 60a1ffb6bc..aebfeca85d 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -16,7 +16,6 @@ case "$board" in alfa-network,ap121f|\ buffalo,bhr-4grv2|\ devolo,magic-2-wifi|\ -domywifi,dw33d|\ engenius,ecb1750|\ etactica,eg200|\ glinet,gl-ar300m-lite|\ @@ -46,6 +45,9 @@ yuncore,xd4200) buffalo,wzr-hp-ag300h) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000" ;; +domywifi,dw33d) + ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000" + ;; glinet,gl-ar150) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000" ;; From ee500186a5617dfe80f4b762fd6bd0c38af93d49 Mon Sep 17 00:00:00 2001 From: Matt Merhar Date: Sun, 19 Apr 2020 17:12:03 -0400 Subject: [PATCH 25/30] kernel: backport fix for non-regular inodes on f2fs Upstream commit dda9f4b9ca ("f2fs: fix to skip verifying block address for non-regular inode"). On 4.14, attempting to perform operations on a non-regular inode residing on an f2fs filesystem, such rm-ing a device node, would fail and lead to a warning / call trace in dmesg. This fix was already applied to other kernels upstream - including 4.19, from which the patch was taken. More info at https://bugzilla.kernel.org/show_bug.cgi?id=202495. Signed-off-by: Matt Merhar --- ...ying-block-address-non-regular-inode.patch | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch diff --git a/target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch b/target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch new file mode 100644 index 0000000000..65ab16a97a --- /dev/null +++ b/target/linux/generic/backport-4.14/050-v4.19-f2fs-skip-verifying-block-address-non-regular-inode.patch @@ -0,0 +1,69 @@ +From dda9f4b9cac6bdd2a96253b4444d7a6ce5132edb Mon Sep 17 00:00:00 2001 +From: Chao Yu +Date: Sat, 11 Aug 2018 23:42:09 +0800 +Subject: f2fs: fix to skip verifying block address for non-regular inode + +generic/184 1s ... [failed, exit status 1]- output mismatch + --- tests/generic/184.out 2015-01-11 16:52:27.643681072 +0800 + QA output created by 184 - silence is golden + +rm: cannot remove '/mnt/f2fs/null': Bad address + +mknod: '/mnt/f2fs/null': Bad address + +chmod: cannot access '/mnt/f2fs/null': Bad address + +./tests/generic/184: line 36: /mnt/f2fs/null: Bad address + ... + +F2FS-fs (zram0): access invalid blkaddr:259 +EIP: f2fs_is_valid_blkaddr+0x14b/0x1b0 [f2fs] + f2fs_iget+0x927/0x1010 [f2fs] + f2fs_lookup+0x26e/0x630 [f2fs] + __lookup_slow+0xb3/0x140 + lookup_slow+0x31/0x50 + walk_component+0x185/0x1f0 + path_lookupat+0x51/0x190 + filename_lookup+0x7f/0x140 + user_path_at_empty+0x36/0x40 + vfs_statx+0x61/0xc0 + __do_sys_stat64+0x29/0x40 + sys_stat64+0x13/0x20 + do_fast_syscall_32+0xaa/0x22c + entry_SYSENTER_32+0x53/0x86 + +In f2fs_iget(), we will check inode's first block address, if it is valid, +we will set FI_FIRST_BLOCK_WRITTEN flag in inode. + +But we should only do this for regular inode, otherwise, like special +inode, i_addr[0] is used for storing device info instead of block address, +it will fail checking flow obviously. + +So for non-regular inode, let's skip verifying address and setting flag. + +Signed-off-by: Chao Yu +Signed-off-by: Jaegeuk Kim +--- + fs/f2fs/inode.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- a/fs/f2fs/inode.c ++++ b/fs/f2fs/inode.c +@@ -310,13 +310,15 @@ static int do_read_inode(struct inode *i + /* get rdev by using inline_info */ + __get_inode_rdev(inode, ri); + +- err = __written_first_block(sbi, ri); +- if (err < 0) { +- f2fs_put_page(node_page, 1); +- return err; ++ if (S_ISREG(inode->i_mode)) { ++ err = __written_first_block(sbi, ri); ++ if (err < 0) { ++ f2fs_put_page(node_page, 1); ++ return err; ++ } ++ if (!err) ++ set_inode_flag(inode, FI_FIRST_BLOCK_WRITTEN); + } +- if (!err) +- set_inode_flag(inode, FI_FIRST_BLOCK_WRITTEN); + + if (!need_inode_block_update(sbi, inode->i_ino)) + fi->last_disk_size = inode->i_size; From 5d81b28a829ac20fb60991e71ee7a7c53d14fd58 Mon Sep 17 00:00:00 2001 From: Xiaobo Tian Date: Wed, 1 Apr 2020 12:19:35 +0800 Subject: [PATCH 26/30] kernel: support intel X7xx 10/40GbE adapters Signed-off-by: Xiaobo Tian [Add i40evf/i40evf.ko and setect CONFIG_IAVF] Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 26a22e9007..e95d84fda8 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -717,6 +717,48 @@ endef $(eval $(call KernelPackage,ixgbevf)) +define KernelPackage/i40e + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Intel(R) Ethernet Controller XL710 Family support + DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +LINUX_5_4:kmod-libphy + KCONFIG:=CONFIG_I40E \ + CONFIG_I40E_VXLAN=n \ + CONFIG_I40E_HWMON=y \ + CONFIG_I40E_DCA=n + FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko + AUTOLOAD:=$(call AutoProbe,i40e) +endef + +define KernelPackage/i40e/description + Kernel modules for Intel(R) Ethernet Controller XL710 Family 40 Gigabit Ethernet adapters. +endef + +$(eval $(call KernelPackage,i40e)) + + +define KernelPackage/iavf + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Intel(R) Ethernet Adaptive Virtual Function support + DEPENDS:=@PCI_SUPPORT + KCONFIG:= \ + CONFIG_I40EVF \ + CONFIG_IAVF + FILES:= \ + $(LINUX_DIR)/drivers/net/ethernet/intel/i40evf/i40evf.ko@lt4.20 \ + $(LINUX_DIR)/drivers/net/ethernet/intel/iavf/iavf.ko@ge4.20 + AUTOLOAD:=$(call AutoProbe,i40evf iavf) + AUTOLOAD:=$(call AutoProbe,iavf) +endef + +define KernelPackage/iavf/description + Kernel modules for Intel XL710, + X710, X722, XXV710, and all devices advertising support for + Intel Ethernet Adaptive Virtual Function devices. +endef + +$(eval $(call KernelPackage,iavf)) + + define KernelPackage/b44 TITLE:=Broadcom 44xx driver KCONFIG:=CONFIG_B44 From cf22c4435e3bcf33e407cab71f7ff48aa00b4ac8 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 18 Apr 2020 16:06:15 -0700 Subject: [PATCH 27/30] toolchain/gcc: eliminate uClibc atexit hack This seems to be over 10 years old. It doesn't seem to be needed anymore. Tested on malta with uClibc (selected BROKEN). Signed-off-by: Rosen Penev --- toolchain/gcc/common.mk | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 090aa2447d..7fb30285aa 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -115,7 +115,8 @@ GCC_CONFIGURE:= \ --with-mpfr=$(TOPDIR)/staging_dir/host \ --with-mpc=$(TOPDIR)/staging_dir/host \ --disable-decimal-float \ - --with-diagnostics-color=auto-if-env + --with-diagnostics-color=auto-if-env \ + --enable-__cxa_atexit ifneq ($(CONFIG_mips)$(CONFIG_mipsel),) GCC_CONFIGURE += --with-mips-plt endif @@ -150,14 +151,6 @@ ifdef CONFIG_sparc --with-long-double-128 endif -ifeq ($(LIBC),uClibc) - GCC_CONFIGURE+= \ - --disable-__cxa_atexit -else - GCC_CONFIGURE+= \ - --enable-__cxa_atexit -endif - ifneq ($(GCC_ARCH),) GCC_CONFIGURE+= --with-arch=$(GCC_ARCH) endif From 050c24f05c85268431515fb118a0710941473f2c Mon Sep 17 00:00:00 2001 From: Li Zhang Date: Fri, 17 Apr 2020 14:39:32 +0800 Subject: [PATCH 28/30] mvebu: add support for GL.iNet GL-MV1000 This patch adds supports for GL-MV1000. Specification: - SOC: Marvell Armada 88F3720 (1GHz) - Flash: 16MB (W25Q128FWSIG) - RAM: 1GB DDR4 - Ethernet: 3x GE (1 WAN + 2 LAN) - EMMC: 8GB EMMC (KLM8G1GETF-B041) - MicroSD: 1x microSD slot - USB: 1x USB 2.0 port(TypeA),1x USB 3.0 port(TypeC) - Button: 1x reset button,1x slide switch - LED: 3x greed LED - UART: 1x UART on PCB (JP1: 3.3V, RX, TX, GND) Update firmware instructions ============================ In the compiled,please gzip -d xxx.img.gz,then update firmware on uboot web. Signed-off-by: Li Zhang [Copied dts file to files-5.4] Signed-off-by: Hauke Mehrtens --- package/boot/uboot-envtools/files/mvebu | 3 + .../base-files/etc/board.d/02_network | 3 +- .../boot/dts/marvell/armada-gl-mv1000.dts | 165 ++++++++++++++++++ .../boot/dts/marvell/armada-gl-mv1000.dts | 165 ++++++++++++++++++ target/linux/mvebu/image/cortexa53.mk | 9 + 5 files changed, 344 insertions(+), 1 deletion(-) create mode 100644 target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts create mode 100644 target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index 7902384a37..b883f0aa8c 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -24,6 +24,9 @@ globalscale,espressobin-v7-emmc|\ marvell,armada8040-mcbin) ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1" ;; +glinet,gl-mv1000) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1" + ;; linksys,caiman|\ linksys,cobra|\ linksys,shelby) diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network index ba4b930426..9b1d97d921 100755 --- a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network @@ -14,7 +14,8 @@ case "$board" in globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-v7|\ -globalscale,espressobin-v7-emmc) +globalscale,espressobin-v7-emmc|\ +glinet,gl-mv1000) ucidef_set_interfaces_lan_wan "lan0 lan1" "wan" ;; marvell,armada-3720-db|\ diff --git a/target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts b/target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts new file mode 100644 index 0000000000..9d7963c5b7 --- /dev/null +++ b/target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts @@ -0,0 +1,165 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for GL.iNet GL-MV1000 + */ + +/dts-v1/; +#include +#include "armada-372x.dtsi" + +/ { + model = "GL.inet GL-MV1000"; + compatible = "glinet,gl-mv1000", "marvell,armada3720"; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x00000000 0x00000000 0x00000000 0x20000000>; + }; + + vcc_sd_reg1: regulator { + compatible = "regulator-gpio"; + regulator-name = "vcc_sd1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + + gpios-states = <0>; + states = <1800000 0x1 + 3300000 0x0>; + enable-active-high; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <104000000>; + m25p,fast-read; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0 0xf0000>; + }; + + partition@f0000 { + label = "u-boot-env"; + reg = <0Xf0000 0x8000>; + }; + + factory: partition@f8000 { + label = "factory"; + reg = <0xf8000 0x8000>; + }; + }; + }; +}; + +&sdhci1 { + wp-inverted; + bus-width = <4>; + cd-gpios = <&gpionb 17 GPIO_ACTIVE_LOW>; + marvell,pad-type = "sd"; + no-1-8-v; + vqmmc-supply = <&vcc_sd_reg1>; + status = "okay"; +}; + +&sdhci0 { + bus-width = <8>; + mmc-ddr-1_8v; + mmc-hs400-1_8v; + non-removable; + no-sd; + no-sdio; + marvell,pad-type = "fixed-1-8v"; + status = "okay"; +}; + +&usb3 { + status = "okay"; +}; + +&usb2 { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&mdio { + switch0: switch0@1 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + dsa,member = <0 0>; + + ports: ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "cpu"; + ethernet = <ð0>; + }; + + port@1 { + reg = <1>; + label = "wan"; + phy-handle = <&switch0phy0>; + }; + + port@2 { + reg = <2>; + label = "lan0"; + phy-handle = <&switch0phy1>; + }; + + port@3 { + reg = <3>; + label = "lan1"; + phy-handle = <&switch0phy2>; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch0phy0: switch0phy0@11 { + reg = <0x11>; + }; + switch0phy1: switch0phy1@12 { + reg = <0x12>; + }; + switch0phy2: switch0phy2@13 { + reg = <0x13>; + }; + }; + }; +}; + +ð0 { + mtd-mac-address = <&factory 0x0>; + phy-mode = "rgmii-id"; + status = "okay"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; diff --git a/target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts b/target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts new file mode 100644 index 0000000000..9d7963c5b7 --- /dev/null +++ b/target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts @@ -0,0 +1,165 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for GL.iNet GL-MV1000 + */ + +/dts-v1/; +#include +#include "armada-372x.dtsi" + +/ { + model = "GL.inet GL-MV1000"; + compatible = "glinet,gl-mv1000", "marvell,armada3720"; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x00000000 0x00000000 0x00000000 0x20000000>; + }; + + vcc_sd_reg1: regulator { + compatible = "regulator-gpio"; + regulator-name = "vcc_sd1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + + gpios-states = <0>; + states = <1800000 0x1 + 3300000 0x0>; + enable-active-high; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <104000000>; + m25p,fast-read; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0 0xf0000>; + }; + + partition@f0000 { + label = "u-boot-env"; + reg = <0Xf0000 0x8000>; + }; + + factory: partition@f8000 { + label = "factory"; + reg = <0xf8000 0x8000>; + }; + }; + }; +}; + +&sdhci1 { + wp-inverted; + bus-width = <4>; + cd-gpios = <&gpionb 17 GPIO_ACTIVE_LOW>; + marvell,pad-type = "sd"; + no-1-8-v; + vqmmc-supply = <&vcc_sd_reg1>; + status = "okay"; +}; + +&sdhci0 { + bus-width = <8>; + mmc-ddr-1_8v; + mmc-hs400-1_8v; + non-removable; + no-sd; + no-sdio; + marvell,pad-type = "fixed-1-8v"; + status = "okay"; +}; + +&usb3 { + status = "okay"; +}; + +&usb2 { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&mdio { + switch0: switch0@1 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + dsa,member = <0 0>; + + ports: ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "cpu"; + ethernet = <ð0>; + }; + + port@1 { + reg = <1>; + label = "wan"; + phy-handle = <&switch0phy0>; + }; + + port@2 { + reg = <2>; + label = "lan0"; + phy-handle = <&switch0phy1>; + }; + + port@3 { + reg = <3>; + label = "lan1"; + phy-handle = <&switch0phy2>; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch0phy0: switch0phy0@11 { + reg = <0x11>; + }; + switch0phy1: switch0phy1@12 { + reg = <0x12>; + }; + switch0phy2: switch0phy2@13 { + reg = <0x13>; + }; + }; + }; +}; + +ð0 { + mtd-mac-address = <&factory 0x0>; + phy-mode = "rgmii-id"; + status = "okay"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; diff --git a/target/linux/mvebu/image/cortexa53.mk b/target/linux/mvebu/image/cortexa53.mk index 77f5c79972..1436c1bd23 100644 --- a/target/linux/mvebu/image/cortexa53.mk +++ b/target/linux/mvebu/image/cortexa53.mk @@ -69,3 +69,12 @@ define Device/methode_udpu BOOT_SCRIPT := udpu endef TARGET_DEVICES += methode_udpu + +define Device/glinet_gl-mv1000 + $(call Device/Default-arm64) + DEVICE_TITLE := GL.iNet GL-MV1000 + DEVICE_DTS := armada-gl-mv1000 + SUPPORTED_DEVICES := glinet,gl-mv1000 +endef +TARGET_DEVICES += glinet_gl-mv1000 + From ad697aabc30875bd078275f59e69667279aa075d Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Wed, 15 Apr 2020 12:49:54 +0800 Subject: [PATCH 29/30] bcm53xx: 5.4: enable NAND NAND driver was dropped in the 5.4 bump, so enable it back Fixes: 50c6938b95a0 ("bcm53xx: add v5.4 support") Signed-off-by: DENG Qingfang --- target/linux/bcm53xx/config-5.4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/bcm53xx/config-5.4 b/target/linux/bcm53xx/config-5.4 index 676015f200..ae9c727818 100644 --- a/target/linux/bcm53xx/config-5.4 +++ b/target/linux/bcm53xx/config-5.4 @@ -307,8 +307,11 @@ CONFIG_MODULES_USE_ELF_REL=y CONFIG_MTD_BCM47XXSFLASH=y CONFIG_MTD_BCM47XX_PARTS=y # CONFIG_MTD_HYPERBUS is not set +CONFIG_MTD_NAND_BRCMNAND=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y CONFIG_MTD_PARSER_TRX=y -# CONFIG_MTD_RAW_NAND is not set +CONFIG_MTD_RAW_NAND=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_SEAMA_FW=y CONFIG_MTD_UBI=y From 3fdb08681b36537f430dc55743c90154790554ce Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 27 Apr 2020 00:17:07 +0200 Subject: [PATCH 30/30] mvebu: tidy up support for GL.iNet GL-MV1000 This fixes a bunch of cosmetic issues with GL.iNet GL-MV1000: - apply alphabetic sorting in multiple files - use armada-3720 prefix for DTS like for other devices - fix vendor capitalization for model in DTSes - remove trivial comment in DTS files - use DEVICE_VENDOR/DEVICE_MODEL - remove redundant SUPPORTED_DEVICES - use SOC instead of DEVICE_DTS - remove empty line at EOF Fixes: 050c24f05c85 ("mvebu: add support for GL.iNet GL-MV1000") Signed-off-by: Adrian Schmutzler --- package/boot/uboot-envtools/files/mvebu | 6 +++--- .../cortexa53/base-files/etc/board.d/02_network | 4 ++-- ...-gl-mv1000.dts => armada-3720-gl-mv1000.dts} | 5 +---- ...-gl-mv1000.dts => armada-3720-gl-mv1000.dts} | 5 +---- target/linux/mvebu/image/cortexa53.mk | 17 ++++++++--------- 5 files changed, 15 insertions(+), 22 deletions(-) rename target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/{armada-gl-mv1000.dts => armada-3720-gl-mv1000.dts} (96%) rename target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/{armada-gl-mv1000.dts => armada-3720-gl-mv1000.dts} (96%) diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index b883f0aa8c..10f31b05a1 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -17,6 +17,9 @@ case "$board" in cznic,turris-omnia) ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000" ;; +glinet,gl-mv1000) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1" + ;; globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-v7|\ @@ -24,9 +27,6 @@ globalscale,espressobin-v7-emmc|\ marvell,armada8040-mcbin) ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1" ;; -glinet,gl-mv1000) - ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1" - ;; linksys,caiman|\ linksys,cobra|\ linksys,shelby) diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network index 9b1d97d921..0a2a2b144c 100755 --- a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network @@ -11,11 +11,11 @@ board_config_update board=$(board_name) case "$board" in +glinet,gl-mv1000|\ globalscale,espressobin|\ globalscale,espressobin-emmc|\ globalscale,espressobin-v7|\ -globalscale,espressobin-v7-emmc|\ -glinet,gl-mv1000) +globalscale,espressobin-v7-emmc) ucidef_set_interfaces_lan_wan "lan0 lan1" "wan" ;; marvell,armada-3720-db|\ diff --git a/target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts b/target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts similarity index 96% rename from target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts rename to target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts index 9d7963c5b7..d1a966f4f8 100644 --- a/target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts +++ b/target/linux/mvebu/files-4.19/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts @@ -1,14 +1,11 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Device Tree file for GL.iNet GL-MV1000 - */ /dts-v1/; #include #include "armada-372x.dtsi" / { - model = "GL.inet GL-MV1000"; + model = "GL.iNet GL-MV1000"; compatible = "glinet,gl-mv1000", "marvell,armada3720"; chosen { diff --git a/target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts b/target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts similarity index 96% rename from target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts rename to target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts index 9d7963c5b7..d1a966f4f8 100644 --- a/target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-gl-mv1000.dts +++ b/target/linux/mvebu/files-5.4/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts @@ -1,14 +1,11 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Device Tree file for GL.iNet GL-MV1000 - */ /dts-v1/; #include #include "armada-372x.dtsi" / { - model = "GL.inet GL-MV1000"; + model = "GL.iNet GL-MV1000"; compatible = "glinet,gl-mv1000", "marvell,armada3720"; chosen { diff --git a/target/linux/mvebu/image/cortexa53.mk b/target/linux/mvebu/image/cortexa53.mk index 1436c1bd23..ff8f2c0930 100644 --- a/target/linux/mvebu/image/cortexa53.mk +++ b/target/linux/mvebu/image/cortexa53.mk @@ -1,3 +1,11 @@ +define Device/glinet_gl-mv1000 + $(call Device/Default-arm64) + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-MV1000 + SOC := armada-3720 +endef +TARGET_DEVICES += glinet_gl-mv1000 + define Device/globalscale_espressobin $(call Device/Default-arm64) DEVICE_VENDOR := Marvell @@ -69,12 +77,3 @@ define Device/methode_udpu BOOT_SCRIPT := udpu endef TARGET_DEVICES += methode_udpu - -define Device/glinet_gl-mv1000 - $(call Device/Default-arm64) - DEVICE_TITLE := GL.iNet GL-MV1000 - DEVICE_DTS := armada-gl-mv1000 - SUPPORTED_DEVICES := glinet,gl-mv1000 -endef -TARGET_DEVICES += glinet_gl-mv1000 -