[PATCH v2 2/2] apm821xx, mt7621, oxnas, rockchip, zynq: remove PLUGIN_HOSTCC

2021-03-05 Thread Ilya Lipnitskiy
This config symbol should not be defined in target configs.

Signed-off-by: Ilya Lipnitskiy 
---
 target/linux/apm821xx/config-5.4   | 1 -
 target/linux/oxnas/config-5.10 | 1 -
 target/linux/oxnas/config-5.4  | 1 -
 target/linux/ramips/mt7621/config-5.4  | 1 -
 target/linux/rockchip/armv8/config-5.4 | 1 -
 target/linux/zynq/config-5.4   | 1 -
 6 files changed, 6 deletions(-)

diff --git a/target/linux/apm821xx/config-5.4 b/target/linux/apm821xx/config-5.4
index 0f59e9f8ff..2b9594c3d4 100644
--- a/target/linux/apm821xx/config-5.4
+++ b/target/linux/apm821xx/config-5.4
@@ -264,7 +264,6 @@ CONFIG_PHYLIB=y
 CONFIG_PHYSICAL_START=0x
 CONFIG_PHYS_64BIT=y
 CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_AUTOSLEEP=y
 CONFIG_PM_SLEEP=y
diff --git a/target/linux/oxnas/config-5.10 b/target/linux/oxnas/config-5.10
index 78436e69ca..9fc3119469 100644
--- a/target/linux/oxnas/config-5.10
+++ b/target/linux/oxnas/config-5.10
@@ -278,7 +278,6 @@ CONFIG_PHY_OXNAS=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_OXNAS=y
 # CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_CLK=y
 # CONFIG_PM_DEBUG is not set
diff --git a/target/linux/oxnas/config-5.4 b/target/linux/oxnas/config-5.4
index ed6f03d388..11f35e295a 100644
--- a/target/linux/oxnas/config-5.4
+++ b/target/linux/oxnas/config-5.4
@@ -275,7 +275,6 @@ CONFIG_PHY_OXNAS=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_OXNAS=y
 # CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_CLK=y
 # CONFIG_PM_DEBUG is not set
diff --git a/target/linux/ramips/mt7621/config-5.4 
b/target/linux/ramips/mt7621/config-5.4
index 36785604a4..5a2d10329d 100644
--- a/target/linux/ramips/mt7621/config-5.4
+++ b/target/linux/ramips/mt7621/config-5.4
@@ -207,7 +207,6 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_RT2880=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PINCTRL_SX150X=y
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_GPIO=y
 CONFIG_POWER_SUPPLY=y
diff --git a/target/linux/rockchip/armv8/config-5.4 
b/target/linux/rockchip/armv8/config-5.4
index 8f9b3354d9..f6ec79b121 100644
--- a/target/linux/rockchip/armv8/config-5.4
+++ b/target/linux/rockchip/armv8/config-5.4
@@ -428,7 +428,6 @@ CONFIG_PINCTRL_ROCKCHIP=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PL330_DMA=y
 CONFIG_PLATFORM_MHU=y
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_CLK=y
 CONFIG_PM_DEVFREQ=y
diff --git a/target/linux/zynq/config-5.4 b/target/linux/zynq/config-5.4
index 08deed7858..ee53e2ae0a 100644
--- a/target/linux/zynq/config-5.4
+++ b/target/linux/zynq/config-5.4
@@ -498,7 +498,6 @@ CONFIG_PL310_ERRATA_769419=y
 CONFIG_PL330_DMA=y
 # CONFIG_PL353_SMC is not set
 CONFIG_PLAT_VERSATILE=y
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PMBUS=y
 CONFIG_PM_CLK=y
-- 
2.30.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v2 1/2] kernel: generic: filter out CONFIG_PLUGIN_HOSTCC

2021-03-05 Thread Ilya Lipnitskiy
It appears to be an automatic Kconfig symbol that varies depending on
the host platform. There is no need to define it in target configs, so
filter it out.

Also sort config-filter entries alphabetically.

Cc: Adrian Schmutzler 
Cc: Felix Fietkau 
Signed-off-by: Ilya Lipnitskiy 
---
 target/linux/generic/config-5.10   | 1 -
 target/linux/generic/config-5.4| 1 -
 target/linux/generic/config-filter | 5 +++--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index 040d62a51d..cb99441dc4 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -4398,7 +4398,6 @@ CONFIG_PINMUX=y
 # CONFIG_PLATFORM_MHU is not set
 # CONFIG_PLAT_SPEAR is not set
 # CONFIG_PLIP is not set
-CONFIG_PLUGIN_HOSTCC=""
 # CONFIG_PLX_DMA is not set
 # CONFIG_PLX_HERMES is not set
 # CONFIG_PM is not set
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index d14000e006..68fe001609 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -4063,7 +4063,6 @@ CONFIG_PINMUX=y
 # CONFIG_PLATFORM_MHU is not set
 # CONFIG_PLAT_SPEAR is not set
 # CONFIG_PLIP is not set
-CONFIG_PLUGIN_HOSTCC=""
 # CONFIG_PLX_HERMES is not set
 # CONFIG_PM is not set
 # CONFIG_PMBUS is not set
diff --git a/target/linux/generic/config-filter 
b/target/linux/generic/config-filter
index 7d634b56cf..719487be5f 100644
--- a/target/linux/generic/config-filter
+++ b/target/linux/generic/config-filter
@@ -3,9 +3,10 @@
 # CONFIG_ARCH_(ENABLE|HAS|HAVE|INLINE|SUPPORTS|USE|WANT|STACKWALK)_.* is not 
set
 # CONFIG_AS_.* is not set
 # CONFIG_CC_(CAN|HAS|IS|VERSION)_.* is not set
-# CONFIG_LD_.* is not set
 # CONFIG_GCC_VERSION is not set
-# CONFIG_INLINE_.* is not set
 # CONFIG_HAVE_(?!(ARCH_TIMER|TCM|SMP)).* is not set
+# CONFIG_INLINE_.* is not set
+# CONFIG_LD_.* is not set
+CONFIG_PLUGIN_HOSTCC=".*"
 # CONFIG_SET_FS is not set
 # CONFIG_TASKS_.* is not set
-- 
2.30.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] kernel: fix kmod-usb3 dependencies

2021-03-05 Thread Ilya Lipnitskiy
Adding CONFIG_USB_XHCI_PCI_RENESAS to KCONFIG made it so it was set
for all targets that included kmod-usb3, not just the intended
apm821xx/nand. xhci-pci has a dependency on xhci-pci-renesas if
CONFIG_USB_XHCI_PCI_RENESAS is set, breaking kmod-usb3 builds on
Linux 5.10 on all other targets.

Rework the dependencies by breaking out xhci-hcd, xhci-mtk, and
xhci-pci-renesas into new hidden kernel modules and setting kmod-usb3
dependencies properly.

Tested by building mt7621 and apm821xx/nand with kmod-usb3 on Linux 5.10

Fixes: be23f981 ("apm821xx: add support for kernel 5.10")
Cc: Christian Lamparter 
Signed-off-by: Ilya Lipnitskiy 
---
 package/kernel/linux/modules/usb.mk | 82 ++---
 1 file changed, 62 insertions(+), 20 deletions(-)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index 1f72d89512..1a45fb3670 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -1649,34 +1649,22 @@ endef
 
 $(eval $(call KernelPackage,usbmon))
 
-XHCI_MODULES := xhci-hcd xhci-pci xhci-plat-hcd
-ifdef CONFIG_TARGET_ramips_mt7621
-  XHCI_MODULES += xhci-mtk
-endif
-ifndef CONFIG_LINUX_5_4
-  ifdef CONFIG_TARGET_apm821xx_nand
-XHCI_MODULES += xhci-pci-renesas
-  endif
-endif
-XHCI_FILES := $(wildcard $(patsubst 
%,$(LINUX_DIR)/drivers/usb/host/%.ko,$(XHCI_MODULES)))
-XHCI_AUTOLOAD := $(patsubst $(LINUX_DIR)/drivers/usb/host/%.ko,%,$(XHCI_FILES))
-
 define KernelPackage/usb3
   TITLE:=Support for USB3 controllers
   DEPENDS:= \
+   +kmod-usb-xhci-hcd \
+TARGET_bcm53xx:kmod-usb-bcma \
-   +TARGET_bcm53xx:kmod-phy-bcm-ns-usb3
+   +TARGET_bcm53xx:kmod-phy-bcm-ns-usb3 \
+   +TARGET_ramips_mt7621:kmod-usb-xhci-mtk \
+   +(TARGET_apm821xx_nand&&LINUX_5_10):kmod-usb-xhci-pci-renesas
   KCONFIG:= \
CONFIG_USB_PCI=y \
-   CONFIG_USB_XHCI_HCD \
CONFIG_USB_XHCI_PCI \
-   CONFIG_USB_XHCI_PLATFORM \
-   CONFIG_USB_XHCI_MTK \
-   CONFIG_USB_XHCI_PCI_RENESAS \
-   CONFIG_USB_XHCI_HCD_DEBUGGING=n
+   CONFIG_USB_XHCI_PLATFORM
   FILES:= \
-   $(XHCI_FILES)
-  AUTOLOAD:=$(call AutoLoad,54,$(XHCI_AUTOLOAD),1)
+   $(LINUX_DIR)/drivers/usb/host/xhci-pci.ko \
+   $(LINUX_DIR)/drivers/usb/host/xhci-plat-hcd.ko
+  AUTOLOAD:=$(call AutoLoad,54,xhci-pci xhci-plat-hcd,1)
   $(call AddDepends/usb)
 endef
 
@@ -1719,6 +1707,60 @@ endef
 $(eval $(call KernelPackage,usb-roles))
 
 
+define KernelPackage/usb-xhci-hcd
+  TITLE:=xHCI HCD (USB 3.0) support
+  KCONFIG:= \
+ CONFIG_USB_XHCI_HCD \
+ CONFIG_USB_XHCI_HCD_DEBUGGING=n
+  HIDDEN:=1
+  FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-hcd.ko
+  AUTOLOAD:=$(call AutoLoad,54,xhci-hcd,1)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-xhci-hcd/description
+  The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0
+  "SuperSpeed" host controller hardware.
+endef
+
+$(eval $(call KernelPackage,usb-xhci-hcd))
+
+
+define KernelPackage/usb-xhci-mtk
+  TITLE:=xHCI support for MediaTek SoCs
+  DEPENDS:=+kmod-usb-xhci-hcd
+  KCONFIG:=CONFIG_USB_XHCI_MTK
+  HIDDEN:=1
+  FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-mtk.ko
+  AUTOLOAD:=$(call AutoLoad,54,xhci-mtk,1)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-xhci-mtk/description
+  Kernel support for the xHCI host controller found in MediaTek SoCs.
+endef
+
+$(eval $(call KernelPackage,usb-xhci-mtk))
+
+
+define KernelPackage/usb-xhci-pci-renesas
+  TITLE:=Support for additional Renesas xHCI controller with firmware
+  DEPENDS:=@LINUX_5_10
+  KCONFIG:=CONFIG_USB_XHCI_PCI_RENESAS
+  HIDDEN:=1
+  FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-pci-renesas.ko
+  AUTOLOAD:=$(call AutoLoad,54,xhci-pci-renesas,1)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-xhci-pci-renesas/description
+  Kernel support for the Renesas xHCI controller with firmware. Make sure you 
have
+  the firwmare for the device and installed on your system for this device to 
work.
+endef
+
+$(eval $(call KernelPackage,usb-xhci-pci-renesas))
+
+
 define KernelPackage/chaoskey
   SUBMENU:=$(USB_MENU)
   TITLE:=Chaoskey hardware RNG support
-- 
2.30.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 1/2] kernel: generic: filter out CONFIG_PLUGIN_HOSTCC

2021-03-05 Thread Ilya Lipnitskiy
It appears to be an automatic Kconfig symbol that varies depending on
the host platform. There is no need to define it in target configs, so
filter it out.

Also sort config-filter entries alphabetically.

Cc: Adrian Schmutzler 
Cc: Felix Fietkau 
Signed-off-by: Ilya Lipnitskiy 
---
 target/linux/generic/config-5.10   | 1 -
 target/linux/generic/config-5.4| 1 -
 target/linux/generic/config-filter | 5 +++--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index 040d62a51d..cb99441dc4 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -4398,7 +4398,6 @@ CONFIG_PINMUX=y
 # CONFIG_PLATFORM_MHU is not set
 # CONFIG_PLAT_SPEAR is not set
 # CONFIG_PLIP is not set
-CONFIG_PLUGIN_HOSTCC=""
 # CONFIG_PLX_DMA is not set
 # CONFIG_PLX_HERMES is not set
 # CONFIG_PM is not set
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index d14000e006..68fe001609 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -4063,7 +4063,6 @@ CONFIG_PINMUX=y
 # CONFIG_PLATFORM_MHU is not set
 # CONFIG_PLAT_SPEAR is not set
 # CONFIG_PLIP is not set
-CONFIG_PLUGIN_HOSTCC=""
 # CONFIG_PLX_HERMES is not set
 # CONFIG_PM is not set
 # CONFIG_PMBUS is not set
diff --git a/target/linux/generic/config-filter 
b/target/linux/generic/config-filter
index 7d634b56cf..719487be5f 100644
--- a/target/linux/generic/config-filter
+++ b/target/linux/generic/config-filter
@@ -3,9 +3,10 @@
 # CONFIG_ARCH_(ENABLE|HAS|HAVE|INLINE|SUPPORTS|USE|WANT|STACKWALK)_.* is not 
set
 # CONFIG_AS_.* is not set
 # CONFIG_CC_(CAN|HAS|IS|VERSION)_.* is not set
-# CONFIG_LD_.* is not set
 # CONFIG_GCC_VERSION is not set
-# CONFIG_INLINE_.* is not set
 # CONFIG_HAVE_(?!(ARCH_TIMER|TCM|SMP)).* is not set
+# CONFIG_INLINE_.* is not set
+# CONFIG_LD_.* is not set
+CONFIG_PLUGIN_HOSTCC=".*"
 # CONFIG_SET_FS is not set
 # CONFIG_TASKS_.* is not set
-- 
2.30.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/2] apm821xx,oxnas,rockchip,zynq: remove PLUGIN_HOSTCC

2021-03-05 Thread Ilya Lipnitskiy
This config symbol should not be defined in target configs.

Signed-off-by: Ilya Lipnitskiy 
---
 target/linux/apm821xx/config-5.4   | 1 -
 target/linux/oxnas/config-5.10 | 1 -
 target/linux/oxnas/config-5.4  | 1 -
 target/linux/rockchip/armv8/config-5.4 | 1 -
 target/linux/zynq/config-5.4   | 1 -
 5 files changed, 5 deletions(-)

diff --git a/target/linux/apm821xx/config-5.4 b/target/linux/apm821xx/config-5.4
index 0f59e9f8ff..2b9594c3d4 100644
--- a/target/linux/apm821xx/config-5.4
+++ b/target/linux/apm821xx/config-5.4
@@ -264,7 +264,6 @@ CONFIG_PHYLIB=y
 CONFIG_PHYSICAL_START=0x
 CONFIG_PHYS_64BIT=y
 CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_AUTOSLEEP=y
 CONFIG_PM_SLEEP=y
diff --git a/target/linux/oxnas/config-5.10 b/target/linux/oxnas/config-5.10
index 78436e69ca..9fc3119469 100644
--- a/target/linux/oxnas/config-5.10
+++ b/target/linux/oxnas/config-5.10
@@ -278,7 +278,6 @@ CONFIG_PHY_OXNAS=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_OXNAS=y
 # CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_CLK=y
 # CONFIG_PM_DEBUG is not set
diff --git a/target/linux/oxnas/config-5.4 b/target/linux/oxnas/config-5.4
index ed6f03d388..11f35e295a 100644
--- a/target/linux/oxnas/config-5.4
+++ b/target/linux/oxnas/config-5.4
@@ -275,7 +275,6 @@ CONFIG_PHY_OXNAS=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_OXNAS=y
 # CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_CLK=y
 # CONFIG_PM_DEBUG is not set
diff --git a/target/linux/rockchip/armv8/config-5.4 
b/target/linux/rockchip/armv8/config-5.4
index 8f9b3354d9..f6ec79b121 100644
--- a/target/linux/rockchip/armv8/config-5.4
+++ b/target/linux/rockchip/armv8/config-5.4
@@ -428,7 +428,6 @@ CONFIG_PINCTRL_ROCKCHIP=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PL330_DMA=y
 CONFIG_PLATFORM_MHU=y
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PM_CLK=y
 CONFIG_PM_DEVFREQ=y
diff --git a/target/linux/zynq/config-5.4 b/target/linux/zynq/config-5.4
index 08deed7858..ee53e2ae0a 100644
--- a/target/linux/zynq/config-5.4
+++ b/target/linux/zynq/config-5.4
@@ -498,7 +498,6 @@ CONFIG_PL310_ERRATA_769419=y
 CONFIG_PL330_DMA=y
 # CONFIG_PL353_SMC is not set
 CONFIG_PLAT_VERSATILE=y
-CONFIG_PLUGIN_HOSTCC="g++"
 CONFIG_PM=y
 CONFIG_PMBUS=y
 CONFIG_PM_CLK=y
-- 
2.30.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v2] bmips: add NAND devices from bcm63xx

2021-03-05 Thread Daniel González Cabanelas
El vie, 5 mar 2021 a las 20:18, Adrian Schmutzler
() escribió:
>
> Hi,
>
> > -Original Message-
> > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> > On Behalf Of Daniel González Cabanelas
> > Sent: Mittwoch, 3. März 2021 15:01
> > To: openwrt-devel@lists.openwrt.org
> > Cc: nolt...@gmail.com
> > Subject: [PATCH v2] bmips: add NAND devices from bcm63xx
> >
> > Add NAND based devices from the bcm63xx target:
> >  - Sercomm AD1018 v1 / v2
> >  - Sercomm H500-s lowi
> >  - Sercomm H500-s vfes
> >  - Comtrend VG-8050
> >  - Huawei HG253s v2
> >
> > They're all already supported, just adapt them for the new WiP bmips target.
>
> base-files are missing.
>
> If we add devices to this target (after the initial one-target-per-board 
> starters), I think we should make sure they are fully supported.
> Otherwise, we risk having to look at everything twice, and will forget some 
> in the middle.
>
I agree, I already archived the patch.

> Weren't some drivers missing as well?
>
Yes, ethernet and PCI.

Regards.

> Best
>
> Adrian
>
> >
> > Signed-off-by: Daniel González Cabanelas 
> > ---
> > Changes in v2:
> >  - Added missing USB nodes for H500-s, deleted unused NAND property
> >  - Commit log changed
> >
> >  .../dts/bcm63167-sercomm-h500-s-lowi.dts  |  13 +
> >  .../dts/bcm63167-sercomm-h500-s-vfes.dts  |  13 +
> >  .../bmips/dts/bcm63167-sercomm-h500-s.dtsi| 204 
> >  .../bmips/dts/bcm63169-comtrend-vg-8050.dts   | 149 
> >  .../bmips/dts/bcm6328-sercomm-ad1018-v1.dts   |  13 +
> >  .../bmips/dts/bcm6328-sercomm-ad1018-v2.dts   |  13 +
> >  .../bmips/dts/bcm6328-sercomm-ad1018.dtsi | 222
> > ++
> >  .../bmips/dts/bcm6362-huawei-hg253s-v2.dts| 141 +++
> >  target/linux/bmips/image/bcm63xx_nand.mk  | 132 ++-
> >  9 files changed, 899 insertions(+), 1 deletion(-)  create mode 100644
> > target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
> >  create mode 100644 target/linux/bmips/dts/bcm63167-sercomm-h500-s-
> > vfes.dts
> >  create mode 100644 target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
> >  create mode 100644 target/linux/bmips/dts/bcm63169-comtrend-vg-
> > 8050.dts
> >  create mode 100644 target/linux/bmips/dts/bcm6328-sercomm-ad1018-
> > v1.dts
> >  create mode 100644 target/linux/bmips/dts/bcm6328-sercomm-ad1018-
> > v2.dts
> >  create mode 100644 target/linux/bmips/dts/bcm6328-sercomm-ad1018.dtsi
> >  create mode 100644 target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts
> >
> > diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
> > b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
> > new file mode 100644
> > index 00..90aa9e1c15
> > --- /dev/null
> > +++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
> > @@ -0,0 +1,13 @@
> > +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> > +/*
> > + * Device Tree file for Sercomm H500-s lowi
> > + *
> > + * Copyright (C) 2020 Daniel González Cabanelas   */
> > +
> > +#include "bcm63167-sercomm-h500-s.dtsi"
> > +
> > +/ {
> > + model = "Sercomm H500-s lowi";
> > + compatible = "sercomm,h500-s-lowi", "brcm,bcm63167",
> > "brcm,bcm63268";
> > +};
> > diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s-vfes.dts
> > b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-vfes.dts
> > new file mode 100644
> > index 00..bd69ccd316
> > --- /dev/null
> > +++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-vfes.dts
> > @@ -0,0 +1,13 @@
> > +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> > +/*
> > + * Device Tree file for Sercomm H500-s vfes
> > + *
> > + * Copyright (C) 2020 Daniel González Cabanelas   */
> > +
> > +#include "bcm63167-sercomm-h500-s.dtsi"
> > +
> > +/ {
> > + model = "Sercomm H500-s vfes";
> > + compatible = "sercomm,h500-s-vfes", "brcm,bcm63167",
> > "brcm,bcm63268";
> > +};
> > diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
> > b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
> > new file mode 100644
> > index 00..f9fe6fe40c
> > --- /dev/null
> > +++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
> > @@ -0,0 +1,204 @@
> > +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> > +/*
> > + * Device Tree file for Sercomm H500-s
> > + *
> > + * Copyright (C) 2020 Daniel González Cabanelas   */
> > +
> > +#include "bcm63268.dtsi"
> > +
> > +/ {
> > + aliases {
> > + led-boot = &led_power_green;
> > + led-failsafe = &led_power_red;
> > + led-running = &led_power_green;
> > + led-upgrade = &led_power_green;
> > + };
> > +
> > + memory@0 {
> > + device_type = "memory";
> > + reg = <0x 0x0800>; /* 128 MiB */
> > + };
> > +
> > + keys {
> > + compatible = "gpio-keys-polled";
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + poll-interval = <20>;
> > +
> > +  

[PATCH] bcm63xx: AD1018-nor: add NAND flash

2021-03-05 Thread Daniel González Cabanelas
The Sercomm AD1018 has a NAND flash. We recently added support for
NANDs in this target target.

Use the internal NAND as additional storage.

Signed-off-by: Daniel González Cabanelas 
---
 .../dts/bcm6328-sercomm-ad1018-nor.dts| 26 +++
 1 file changed, 26 insertions(+)

diff --git a/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018-nor.dts 
b/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018-nor.dts
index 83f7578b06..341f72c193 100644
--- a/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018-nor.dts
+++ b/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018-nor.dts
@@ -146,6 +146,32 @@
};
 };
 
+&nflash {
+   status = "okay";
+
+   nandcs@0 {
+   compatible = "brcm,nandcs";
+   #size-cells = <1>;
+   #address-cells = <1>;
+   reg = <0>;
+   nand-ecc-step-size = <512>;
+   nand-ecc-strength = <15>;
+   nand-on-flash-bbt;
+   brcm,nand-oob-sector-size = <64>;
+
+   partitions {
+   compatible = "fixed-partitions";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   partition@0 {
+   label = "storage";
+   reg = <0 0>; /* autodetected size */
+   };
+   };
+   };
+};
+
 &uart0 {
status = "okay";
 };
-- 
2.30.1





___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


RE: [PATCH v2] bmips: add NAND devices from bcm63xx

2021-03-05 Thread Adrian Schmutzler
Hi,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Daniel González Cabanelas
> Sent: Mittwoch, 3. März 2021 15:01
> To: openwrt-devel@lists.openwrt.org
> Cc: nolt...@gmail.com
> Subject: [PATCH v2] bmips: add NAND devices from bcm63xx
> 
> Add NAND based devices from the bcm63xx target:
>  - Sercomm AD1018 v1 / v2
>  - Sercomm H500-s lowi
>  - Sercomm H500-s vfes
>  - Comtrend VG-8050
>  - Huawei HG253s v2
> 
> They're all already supported, just adapt them for the new WiP bmips target.

base-files are missing.

If we add devices to this target (after the initial one-target-per-board 
starters), I think we should make sure they are fully supported.
Otherwise, we risk having to look at everything twice, and will forget some in 
the middle.

Weren't some drivers missing as well?

Best

Adrian

> 
> Signed-off-by: Daniel González Cabanelas 
> ---
> Changes in v2:
>  - Added missing USB nodes for H500-s, deleted unused NAND property
>  - Commit log changed
> 
>  .../dts/bcm63167-sercomm-h500-s-lowi.dts  |  13 +
>  .../dts/bcm63167-sercomm-h500-s-vfes.dts  |  13 +
>  .../bmips/dts/bcm63167-sercomm-h500-s.dtsi| 204 
>  .../bmips/dts/bcm63169-comtrend-vg-8050.dts   | 149 
>  .../bmips/dts/bcm6328-sercomm-ad1018-v1.dts   |  13 +
>  .../bmips/dts/bcm6328-sercomm-ad1018-v2.dts   |  13 +
>  .../bmips/dts/bcm6328-sercomm-ad1018.dtsi | 222
> ++
>  .../bmips/dts/bcm6362-huawei-hg253s-v2.dts| 141 +++
>  target/linux/bmips/image/bcm63xx_nand.mk  | 132 ++-
>  9 files changed, 899 insertions(+), 1 deletion(-)  create mode 100644
> target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
>  create mode 100644 target/linux/bmips/dts/bcm63167-sercomm-h500-s-
> vfes.dts
>  create mode 100644 target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
>  create mode 100644 target/linux/bmips/dts/bcm63169-comtrend-vg-
> 8050.dts
>  create mode 100644 target/linux/bmips/dts/bcm6328-sercomm-ad1018-
> v1.dts
>  create mode 100644 target/linux/bmips/dts/bcm6328-sercomm-ad1018-
> v2.dts
>  create mode 100644 target/linux/bmips/dts/bcm6328-sercomm-ad1018.dtsi
>  create mode 100644 target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts
> 
> diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
> b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
> new file mode 100644
> index 00..90aa9e1c15
> --- /dev/null
> +++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-lowi.dts
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> +/*
> + * Device Tree file for Sercomm H500-s lowi
> + *
> + * Copyright (C) 2020 Daniel González Cabanelas   */
> +
> +#include "bcm63167-sercomm-h500-s.dtsi"
> +
> +/ {
> + model = "Sercomm H500-s lowi";
> + compatible = "sercomm,h500-s-lowi", "brcm,bcm63167",
> "brcm,bcm63268";
> +};
> diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s-vfes.dts
> b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-vfes.dts
> new file mode 100644
> index 00..bd69ccd316
> --- /dev/null
> +++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s-vfes.dts
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> +/*
> + * Device Tree file for Sercomm H500-s vfes
> + *
> + * Copyright (C) 2020 Daniel González Cabanelas   */
> +
> +#include "bcm63167-sercomm-h500-s.dtsi"
> +
> +/ {
> + model = "Sercomm H500-s vfes";
> + compatible = "sercomm,h500-s-vfes", "brcm,bcm63167",
> "brcm,bcm63268";
> +};
> diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
> b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
> new file mode 100644
> index 00..f9fe6fe40c
> --- /dev/null
> +++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
> @@ -0,0 +1,204 @@
> +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> +/*
> + * Device Tree file for Sercomm H500-s
> + *
> + * Copyright (C) 2020 Daniel González Cabanelas   */
> +
> +#include "bcm63268.dtsi"
> +
> +/ {
> + aliases {
> + led-boot = &led_power_green;
> + led-failsafe = &led_power_red;
> + led-running = &led_power_green;
> + led-upgrade = &led_power_green;
> + };
> +
> + memory@0 {
> + device_type = "memory";
> + reg = <0x 0x0800>; /* 128 MiB */
> + };
> +
> + keys {
> + compatible = "gpio-keys-polled";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + poll-interval = <20>;
> +
> + wps {
> + label = "wps";
> + gpios = <&pinctrl 34 1>;
> + linux,code = ;
> + debounce-interval = <60>;
> + };
> +
> + reset {
> + label = "reset";
> + gpios = <&pinctrl 35 1>;
> + linux,code = ;
> + debounce-interval

Re: [PATCH 2/2] generic: enable netlink ethtool interface

2021-03-05 Thread David Bauer



On 3/5/21 12:57 AM, Paul Spooren wrote:
> What's the size change?

48 kiB

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Backport of 'usbip: tools: fix build error for multiple definition' [Was: Re: [PATCH] kernel: backport GCC 10 usbip build fix for 5.4]

2021-03-05 Thread Petr Štetiar
Hi stable,

can we please get following patch from v5.9-rc1~142^2~213 backported into the
stable kernels?

 From d5efc2e6b98fe661dbd8dd0d5d5bfb961728e57a Mon Sep 17 00:00:00 2001
 From: Antonio Borneo 
 Date: Thu, 18 Jun 2020 02:08:44 +0200
 Subject: usbip: tools: fix build error for multiple definition

Thanks!

Cheers,

Petr

> From the original commit message:
> 
> "With GCC 10, building usbip triggers error for multiple definition
> of 'udev_context', in:
> - libsrc/vhci_driver.c:18 and
> - libsrc/usbip_host_common.c:27.
> 
> Declare as extern the definition in libsrc/usbip_host_common.c."
> 
> Signed-off-by: Rui Salvaterra 
> ---
>  ...-build-error-for-multiple-definition.patch | 33 +++
>  1 file changed, 33 insertions(+)
>  create mode 100644 
> target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
> 
> diff --git 
> a/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
>  
> b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
> new file mode 100644
> index 00..03f27fb528
> --- /dev/null
> +++ 
> b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
> @@ -0,0 +1,33 @@
> +From d5efc2e6b98fe661dbd8dd0d5d5bfb961728e57a Mon Sep 17 00:00:00 2001
> +From: Antonio Borneo 
> +Date: Thu, 18 Jun 2020 02:08:44 +0200
> +Subject: usbip: tools: fix build error for multiple definition
> +
> +With GCC 10, building usbip triggers error for multiple definition
> +of 'udev_context', in:
> +- libsrc/vhci_driver.c:18 and
> +- libsrc/usbip_host_common.c:27.
> +
> +Declare as extern the definition in libsrc/usbip_host_common.c.
> +
> +Signed-off-by: Antonio Borneo 
> +Acked-by: Shuah Khan 
> +Link: 
> https://lore.kernel.org/r/20200618000844.1048309-1-borneo.anto...@gmail.com
> +Signed-off-by: Greg Kroah-Hartman 
> +---
> + tools/usb/usbip/libsrc/usbip_host_common.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +(limited to 'tools/usb/usbip')
> +
> +--- a/tools/usb/usbip/libsrc/usbip_host_common.c
>  b/tools/usb/usbip/libsrc/usbip_host_common.c
> +@@ -23,7 +23,7 @@
> + #include "list.h"
> + #include "sysfs_utils.h"
> + 
> +-struct udev *udev_context;
> ++extern struct udev *udev_context;
> + 
> + static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
> + {
> -- 
> 2.30.1

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] kernel: backport GCC 10 usbip build fix for 5.4

2021-03-05 Thread Rui Salvaterra
>From the original commit message:

"With GCC 10, building usbip triggers error for multiple definition
of 'udev_context', in:
- libsrc/vhci_driver.c:18 and
- libsrc/usbip_host_common.c:27.

Declare as extern the definition in libsrc/usbip_host_common.c."

Signed-off-by: Rui Salvaterra 
---
 ...-build-error-for-multiple-definition.patch | 33 +++
 1 file changed, 33 insertions(+)
 create mode 100644 
target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch

diff --git 
a/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
 
b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
new file mode 100644
index 00..03f27fb528
--- /dev/null
+++ 
b/target/linux/generic/backport-5.4/831-v5.9-usbip-tools-fix-build-error-for-multiple-definition.patch
@@ -0,0 +1,33 @@
+From d5efc2e6b98fe661dbd8dd0d5d5bfb961728e57a Mon Sep 17 00:00:00 2001
+From: Antonio Borneo 
+Date: Thu, 18 Jun 2020 02:08:44 +0200
+Subject: usbip: tools: fix build error for multiple definition
+
+With GCC 10, building usbip triggers error for multiple definition
+of 'udev_context', in:
+- libsrc/vhci_driver.c:18 and
+- libsrc/usbip_host_common.c:27.
+
+Declare as extern the definition in libsrc/usbip_host_common.c.
+
+Signed-off-by: Antonio Borneo 
+Acked-by: Shuah Khan 
+Link: 
https://lore.kernel.org/r/20200618000844.1048309-1-borneo.anto...@gmail.com
+Signed-off-by: Greg Kroah-Hartman 
+---
+ tools/usb/usbip/libsrc/usbip_host_common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+(limited to 'tools/usb/usbip')
+
+--- a/tools/usb/usbip/libsrc/usbip_host_common.c
 b/tools/usb/usbip/libsrc/usbip_host_common.c
+@@ -23,7 +23,7 @@
+ #include "list.h"
+ #include "sysfs_utils.h"
+ 
+-struct udev *udev_context;
++extern struct udev *udev_context;
+ 
+ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
+ {
-- 
2.30.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] iproute2: fix build with a newer toolchain

2021-03-05 Thread Rui Salvaterra
Hi,

On Wed, 3 Mar 2021 at 20:48, Rui Salvaterra  wrote:
>
> GCC 10.2.0 complains loudly of missing limits.h. Add a patch to fix this.
>
> Signed-off-by: Rui Salvaterra 

As a side note, I tried building from a pristine master today and tc
*always* fails to build for me, being a -j n or at -j 1 (that should
exclude possible race conditions). It's not possible I'm the only one
seeing this. :/

Cheers,
Rui

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 0/2] Fix OpenWrt images in current U-boot

2021-03-05 Thread Robert Marko
On Fri, Mar 5, 2021 at 4:25 AM Daniel Golle  wrote:
>
> Hi Robert,
>
> On Thu, Mar 04, 2021 at 12:37:20PM +0100, Robert Marko wrote:
> > U-boot will reject the nodes with @ for the address since
> > commit:
> > https://gitlab.denx.de/u-boot/u-boot/-/commit/79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4
> >
> > This in turn will cause the failure to boot with OpenWrt
> > generated images.
> >
> > So, to rectify that simply replace @ with -.
>
> I've pulled your patches into my staging tree and also covered the
> recently added additions to mkits.sh (rootfs@1, initrd@1).
> I tested on the BPi-R64 and Linksys E8450 devices (U-Boot 2020.10).
> Neither the new block/partitions/fit.c parser nor oldschool
> drivers/mtd/mtdsplit/fit.c rely on that '@' sign, so things should
> be fine equally for all platforms using mkits.sh in some way or
> another.
>
> Is the dash '-' symbol the recommened separator to be used for
> enumarated image nodes? Just not to introduce the next 'smart' (but
> practically unneeded, at least for) convention which will then
> later on again need to be fixed before anyone ever adds more than
> one image of each type (which isn't actually supported anywhere,
> not in mkits.sh, neither anywhere else in the build system).

U-boot is a bit vague about it, but they have changed all of the tests
to check for '-' instead of '@' so I guess it's preferred.

Regards,
Robert
>
> Of course, it would be very nice to use the fancy features FIT can
> offer such as having a single image with several DTB nodes and letting
> the bootloader choose the right one for the board. (quite some work
> on the build-system would be needed for that).
>
> Or bundling additional squashfs blobs which are overlay-mounted
> on top of the regular rootfs eg. for localization or community mesh
> firmware.
> I'm already working on that and if more platforms switch to use the fit
> partition parser and start using `mkimage -E`-style (_external data_)
> FIT images including the rootfs or initrd as FIT sub-images instead of
> writing rootfs at (from bootloader perspective) arbitrary,
> platform-specific location into the flash or compiling the initrd as
> object into the kernel (not cool for ImageBuilder...).
>
> However, even with all those cool features in mind, I still don't see
> the point of supporting **enumerated** images with a name-prefix, let
> it be kernel-1, kernel1, kernel_1, kernel#1 or whatever.
> If we ever support multi-dtb or multi-kernel images, then the names
> should be more meaningful, eg. kernel-mvebu-cortexa72 and
> kernel-mediatek-mt7622 along with several names DTBs, eg.
> dtb-mt7622-linksys-e8450, dtb-marvell-macchiatobin-doubleshot and
> potentially a lot of devices, all supported by that single image.
> When flashing such an image to a device, we could drop the uneeded
> sub-images (ie. not matching selected config). (anyone interested?)
>
>
>
> Cheers
>
>
>
> Daniel
>
>
> >
> > Robert Marko (2):
> >   scripts: mktish.sh: replace @ with - in nodes
> >   build: use config-1 instead of config@1 as default
> >
> >  include/image-commands.mk | 2 +-
> >  include/image.mk  | 2 +-
> >  scripts/mkits.sh  | 8 
> >  3 files changed, 6 insertions(+), 6 deletions(-)
> >
> > --
> > 2.29.2
> >
> >
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
1 Zagreb, Croatia
Email: robert.ma...@sartura.hr
Web: www.sartura.hr

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel