From b302a44206dc5702734d2e464a855875bd0ad1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 3 Jun 2020 09:00:09 +0200 Subject: [PATCH 01/49] bcm63xx: stop using legacy lzma for all devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BCM6368 and newer devices are compatible with any lzma compression parameters. Add a new legacy device definition and use it on BCM6358 and older devices. Compressed kernel size is reduced by ~1.35%. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/image/bcm63xx.mk | 113 ++++++++++++++------------ 1 file changed, 59 insertions(+), 54 deletions(-) diff --git a/target/linux/bcm63xx/image/bcm63xx.mk b/target/linux/bcm63xx/image/bcm63xx.mk index 2627cbb509..15cc549ec4 100644 --- a/target/linux/bcm63xx/image/bcm63xx.mk +++ b/target/linux/bcm63xx/image/bcm63xx.mk @@ -19,7 +19,7 @@ endef define Device/bcm63xx FILESYSTEMS := squashfs jffs2-64k jffs2-128k - KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf IMAGES := cfe.bin IMAGE/cfe.bin := cfe-bin --pad $$$$(shell expr $$$$(FLASH_MB) / 2) @@ -36,6 +36,11 @@ define Device/bcm63xx CFE_EXTRAS = --block-size $$(BLOCK_SIZE) --image-offset $$(if $$(IMAGE_OFFSET),$$(IMAGE_OFFSET),$$(BLOCK_SIZE)) endef +define Device/bcm63xx-legacy + $(Device/bcm63xx) + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe +endef + define Device/bcm63xx_netgear $(Device/bcm63xx) DEVICE_VENDOR := NETGEAR @@ -76,7 +81,7 @@ endef TARGET_DEVICES += brcm_bcm96328avng define Device/brcm_bcm96338gw - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96338GW CFE_BOARD_ID := 6338GW @@ -85,7 +90,7 @@ endef TARGET_DEVICES += brcm_bcm96338gw define Device/brcm_bcm96338w - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96338W CFE_BOARD_ID := 6338W @@ -95,7 +100,7 @@ endef TARGET_DEVICES += brcm_bcm96338w define Device/brcm_bcm96345gw2 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96345GW2 IMAGES += cfe-bc221.bin @@ -106,7 +111,7 @@ endef TARGET_DEVICES += brcm_bcm96345gw2 define Device/brcm_bcm96348gw - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96348GW IMAGES += cfe-bc221.bin @@ -117,7 +122,7 @@ endef TARGET_DEVICES += brcm_bcm96348gw define Device/brcm_bcm96348gw-10 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96348GW-10 CFE_BOARD_ID := 96348GW-10 @@ -127,7 +132,7 @@ endef TARGET_DEVICES += brcm_bcm96348gw-10 define Device/brcm_bcm96348gw-11 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96348GW-11 CFE_BOARD_ID := 96348GW-11 @@ -137,7 +142,7 @@ endef TARGET_DEVICES += brcm_bcm96348gw-11 define Device/brcm_bcm96348r - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96348R CFE_BOARD_ID := 96348R @@ -147,7 +152,7 @@ endef TARGET_DEVICES += brcm_bcm96348r define Device/brcm_bcm96358vw - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96358VW CFE_BOARD_ID := 96358VW @@ -156,7 +161,7 @@ endef TARGET_DEVICES += brcm_bcm96358vw define Device/brcm_bcm96358vw2 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Generic DEVICE_MODEL := 96358VW2 CFE_BOARD_ID := 96358VW2 @@ -245,7 +250,7 @@ TARGET_DEVICES += adb_av4202n ### Alcatel ### define Device/alcatel_rg100a - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Alcatel DEVICE_MODEL := RG100A CFE_BOARD_ID := 96358VW2 @@ -257,7 +262,7 @@ TARGET_DEVICES += alcatel_rg100a ### Asmax ### define Device/asmax_ar-1004g - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Asmax DEVICE_MODEL := AR 1004g CFE_BOARD_ID := 96348GW-10 @@ -269,7 +274,7 @@ TARGET_DEVICES += asmax_ar-1004g ### Belkin ### define Device/belkin_f5d7633 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Belkin DEVICE_MODEL := F5D7633 CFE_BOARD_ID := 96348GW-10 @@ -328,7 +333,7 @@ TARGET_DEVICES += brcm_bcm963269bhr ### BT ### define Device/bt_home-hub-2-a - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := BT DEVICE_MODEL := Home Hub 2.0 DEVICE_VARIANT := A @@ -340,7 +345,7 @@ endef TARGET_DEVICES += bt_home-hub-2-a define Device/bt_voyager-2110 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := BT DEVICE_MODEL := Voyager 2110 CFE_BOARD_ID := V2110 @@ -352,7 +357,7 @@ endef TARGET_DEVICES += bt_voyager-2110 define Device/bt_voyager-2500v-bb - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := BT DEVICE_MODEL := Voyager 2500V CFE_BOARD_ID := V2500V_BB @@ -401,7 +406,7 @@ endef TARGET_DEVICES += comtrend_ar-5387un define Device/comtrend_ct-536plus - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Comtrend DEVICE_MODEL := CT-536+ DEVICE_ALT0_VENDOR := Comtrend @@ -414,7 +419,7 @@ endef TARGET_DEVICES += comtrend_ct-536plus define Device/comtrend_ct-5365 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Comtrend DEVICE_MODEL := CT-5365 CFE_BOARD_ID := 96348A-122 @@ -425,7 +430,7 @@ endef TARGET_DEVICES += comtrend_ct-5365 define Device/comtrend_ct-6373 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Comtrend DEVICE_MODEL := CT-6373 CFE_BOARD_ID := CT6373-1 @@ -483,7 +488,7 @@ TARGET_DEVICES += comtrend_wap-5813n ### D-Link ### define Device/d-link_dsl-2640b-b - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := D-Link DEVICE_MODEL := DSL-2640B DEVICE_VARIANT := B2 @@ -495,7 +500,7 @@ endef TARGET_DEVICES += d-link_dsl-2640b-b define Device/d-link_dsl-2640u - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := D-Link DEVICE_MODEL := DSL-2640U DEVICE_VARIANT := C1 @@ -509,7 +514,7 @@ endef TARGET_DEVICES += d-link_dsl-2640u define Device/d-link_dsl-2650u - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := D-Link DEVICE_MODEL := DSL-2650U CFE_BOARD_ID := 96358VW2 @@ -519,7 +524,7 @@ endef TARGET_DEVICES += d-link_dsl-2650u define Device/d-link_dsl-274xb-c2 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := D-Link DEVICE_MODEL := DSL-2740B DEVICE_VARIANT := C2 @@ -534,7 +539,7 @@ endef TARGET_DEVICES += d-link_dsl-274xb-c2 define Device/d-link_dsl-274xb-c3 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := D-Link DEVICE_MODEL := DSL-2740B DEVICE_VARIANT := C3 @@ -582,7 +587,7 @@ endef TARGET_DEVICES += d-link_dsl-275xb-d1 define Device/d-link_dva-g3810bn-tl - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := D-Link DEVICE_MODEL := DVA-G3810BN/TL CFE_BOARD_ID := 96358VW @@ -593,7 +598,7 @@ TARGET_DEVICES += d-link_dva-g3810bn-tl ### Davolink ### define Device/davolink_dv-201amr - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Davolink DEVICE_MODEL := DV-201AMR IMAGES := cfe-old.bin @@ -606,7 +611,7 @@ TARGET_DEVICES += davolink_dv-201amr ### Dynalink ### define Device/dynalink_rta770bw - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Dynalink DEVICE_MODEL := RTA770BW DEVICE_ALT0_VENDOR := Siemens @@ -621,7 +626,7 @@ endef TARGET_DEVICES += dynalink_rta770bw define Device/dynalink_rta770w - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Dynalink DEVICE_MODEL := RTA770W IMAGES = @@ -634,7 +639,7 @@ endef TARGET_DEVICES += dynalink_rta770w define Device/dynalink_rta1025w - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Dynalink DEVICE_MODEL := RTA1025W CFE_BOARD_ID := RTA1025W_16 @@ -646,7 +651,7 @@ endef TARGET_DEVICES += dynalink_rta1025w define Device/dynalink_rta1320 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Dynalink DEVICE_MODEL := RTA1320 CFE_BOARD_ID := RTA1320_16M @@ -658,7 +663,7 @@ TARGET_DEVICES += dynalink_rta1320 ### Huawei ### define Device/huawei_echolife-hg520v - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Huawei DEVICE_MODEL := EchoLife HG520v CFE_BOARD_ID := HW6358GW_B @@ -671,7 +676,7 @@ endef TARGET_DEVICES += huawei_echolife-hg520v define Device/huawei_echolife-hg553 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Huawei DEVICE_MODEL := EchoLife HG553 CFE_BOARD_ID := HW553 @@ -683,7 +688,7 @@ endef TARGET_DEVICES += huawei_echolife-hg553 define Device/huawei_echolife-hg556a-a - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Huawei DEVICE_MODEL := EchoLife HG556a DEVICE_VARIANT := A @@ -697,7 +702,7 @@ endef TARGET_DEVICES += huawei_echolife-hg556a-a define Device/huawei_echolife-hg556a-b - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Huawei DEVICE_MODEL := EchoLife HG556a DEVICE_VARIANT := B @@ -711,7 +716,7 @@ endef TARGET_DEVICES += huawei_echolife-hg556a-b define Device/huawei_echolife-hg556a-c - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Huawei DEVICE_MODEL := EchoLife HG556a DEVICE_VARIANT := C @@ -787,7 +792,7 @@ endef TARGET_DEVICES += netgear_cvg834g define Device/netgear_dg834gt-pn - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := NETGEAR DEVICE_MODEL := DG834GT DEVICE_ALT0_VENDOR := NETGEAR @@ -800,7 +805,7 @@ endef TARGET_DEVICES += netgear_dg834gt-pn define Device/netgear_dg834g-v4 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := NETGEAR DEVICE_MODEL := DG834G DEVICE_VARIANT := v4 @@ -881,7 +886,7 @@ TARGET_DEVICES += observa_vh4032n ### Pirelli ### define Device/pirelli_a226g - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Pirelli DEVICE_MODEL := A226G CFE_BOARD_ID := DWV-S0 @@ -892,7 +897,7 @@ endef TARGET_DEVICES += pirelli_a226g define Device/pirelli_a226m - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Pirelli DEVICE_MODEL := A226M CFE_BOARD_ID := DWV-S0 @@ -903,7 +908,7 @@ endef TARGET_DEVICES += pirelli_a226m define Device/pirelli_a226m-fwb - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Pirelli DEVICE_MODEL := A226M-FWB CFE_BOARD_ID := DWV-S0 @@ -915,7 +920,7 @@ endef TARGET_DEVICES += pirelli_a226m-fwb define Device/pirelli_agpf-s0 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Pirelli DEVICE_MODEL := Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0 CFE_BOARD_ID := AGPF-S0 @@ -928,7 +933,7 @@ TARGET_DEVICES += pirelli_agpf-s0 ### Sagem ### define Device/sagem_fast-2404 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Sagemcom DEVICE_MODEL := F@st 2404 CFE_BOARD_ID := F@ST2404 @@ -949,7 +954,7 @@ endef TARGET_DEVICES += sagem_fast-2504n define Device/sagem_fast-2604 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Sagemcom DEVICE_MODEL := F@st 2604 CFE_BOARD_ID := F@ST2604 @@ -996,7 +1001,7 @@ TARGET_DEVICES += sercomm_ad1018-nor ### SFR ### define Device/sfr_neufbox-4-sercomm-r0 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := SFR DEVICE_MODEL := Neufbox 4 DEVICE_VARIANT := Sercomm @@ -1008,7 +1013,7 @@ endef TARGET_DEVICES += sfr_neufbox-4-sercomm-r0 define Device/sfr_neufbox-4-foxconn-r1 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := SFR DEVICE_MODEL := Neufbox 4 DEVICE_VARIANT := Foxconn @@ -1045,7 +1050,7 @@ TARGET_DEVICES += sky_sr102 ### T-Com ### define Device/t-com_speedport-w-303v - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := T-Com DEVICE_MODEL := Speedport W 303V IMAGES := factory.bin sysupgrade.bin @@ -1058,7 +1063,7 @@ endef TARGET_DEVICES += t-com_speedport-w-303v define Device/t-com_speedport-w-500v - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := T-Com DEVICE_MODEL := Speedport W 500V CFE_BOARD_ID := 96348GW @@ -1070,7 +1075,7 @@ TARGET_DEVICES += t-com_speedport-w-500v ### Tecom ### define Device/tecom_gw6000 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Tecom DEVICE_MODEL := GW6000 CFE_BOARD_ID := 96348GW @@ -1081,7 +1086,7 @@ endef TARGET_DEVICES += tecom_gw6000 define Device/tecom_gw6200 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Tecom DEVICE_MODEL := GW6200 CFE_BOARD_ID := 96348GW @@ -1094,7 +1099,7 @@ TARGET_DEVICES += tecom_gw6200 ### Telsey ### define Device/telsey_cpva502plus - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Telsey DEVICE_MODEL := CPVA502+ CFE_BOARD_ID := CPVA502+ @@ -1106,7 +1111,7 @@ endef TARGET_DEVICES += telsey_cpva502plus define Device/telsey_cpva642 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Telsey DEVICE_MODEL := CPVA642-type (CPA-ZNTE60T) CFE_BOARD_ID := CPVA642 @@ -1118,7 +1123,7 @@ endef TARGET_DEVICES += telsey_cpva642 define Device/telsey_magic - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := Alice DEVICE_MODEL := W-Gate DEVICE_ALT0_VENDOR := Telsey @@ -1133,7 +1138,7 @@ TARGET_DEVICES += telsey_magic ### TP-Link ### define Device/tp-link_td-w8900gb - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := TP-Link DEVICE_MODEL := TD-W8900GB CFE_BOARD_ID := 96348GW-11 @@ -1147,7 +1152,7 @@ TARGET_DEVICES += tp-link_td-w8900gb ### USRobotics ### define Device/usrobotics_usr9108 - $(Device/bcm63xx) + $(Device/bcm63xx-legacy) DEVICE_VENDOR := USRobotics DEVICE_MODEL := USR9108 CFE_BOARD_ID := 96348GW-A From 39f44be1dc85b0cf16ede5ae037cb0487fad0a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 3 Jun 2020 11:18:11 +0200 Subject: [PATCH 02/49] bcm63xx: ad1018: add missing partitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This partitions were missing when support for this device was added. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts b/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts index 421029054a..e2c2e07d29 100644 --- a/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts +++ b/target/linux/bcm63xx/dts/bcm6328-sercomm-ad1018.dts @@ -167,6 +167,18 @@ read-only; }; + partition@340000 { + label = "serial"; + reg = <0x0340000 0x00a0000>; + read-only; + }; + + partition@3e0000 { + label = "protect"; + reg = <0x03e0000 0x0140000>; + read-only; + }; + partition@6920000 { label = "bootflag1"; reg = <0x6920000 0x0140000>; From 231f728f69e0451c44998187cc36ebb0ab9e9ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 3 Jun 2020 11:20:58 +0200 Subject: [PATCH 03/49] bcm63xx: ad1018: remove cfe.bin image support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently, Sercomm allows loading a BCM WFI image via CFE, but this image destroys "serial" and "protect" nand partitions, which is wrong. It will also set both bootflags to the same value, which causes booting issues with cferam (cferom will alternatively boot from cferam1 or cferam2 each time the device is rebooted). Now that OEM Sercomm images are supported it's time to remove this hacky cfe.bin image support. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/image/Makefile | 25 ---------------------- target/linux/bcm63xx/image/bcm63xx_nand.mk | 3 +-- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/target/linux/bcm63xx/image/Makefile b/target/linux/bcm63xx/image/Makefile index eb4b78b06a..d7e2432bdb 100644 --- a/target/linux/bcm63xx/image/Makefile +++ b/target/linux/bcm63xx/image/Makefile @@ -96,31 +96,6 @@ define Image/FileSystemStrip $(firstword $(subst +,$(space),$(subst root.,,$(notdir $(1))))) endef -define Build/ad1018-jffs2-cferam - mv $@ $@.kernel - - rm -rf $@-cferam - mkdir -p $@-cferam - - # CFE RAM JFFS2 partition - cp $(KDIR)/bcm63xx-cfe/$(CFE_RAM_FILE) $@-cferam/$(CFE_RAM_JFFS2_NAME) - $(call Build/cfe-jffs2,$@-cferam) - mv $@ $@.cferam - - # First block of CFE RAM 1 will be destroyed by MMAP - dd if=$@.cferam bs=$(BLOCKSIZE) count=1 > $@ - dd if=$@.cferam >> $@ - $(call Build/pad-to,896k) - - # CFE RAM 2 - dd if=$@.cferam >> $@ - - # Append kernel @ 4M - $(call Build/pad-to,4096k) - dd if=$@.kernel >> $@ - rm -f $@.kernel -endef - define Build/cfe-bin $(STAGING_DIR_HOST)/bin/imagetag -i $(IMAGE_KERNEL) -f $(IMAGE_ROOTFS) \ --output $@ --boardid $(CFE_BOARD_ID) --chipid $(CHIP_ID) \ diff --git a/target/linux/bcm63xx/image/bcm63xx_nand.mk b/target/linux/bcm63xx/image/bcm63xx_nand.mk index 74f23f52af..7b2039c988 100644 --- a/target/linux/bcm63xx/image/bcm63xx_nand.mk +++ b/target/linux/bcm63xx/image/bcm63xx_nand.mk @@ -39,7 +39,7 @@ endef define Device/sercomm-nand $(Device/bcm63xx-nand) - IMAGES += factory.img + IMAGES = factory.img sysupgrade.bin IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | cfe-sercomm-part | gzip | cfe-sercomm-load | cfe-sercomm-crypto SERCOM_PID := SERCOMM_VERSION := @@ -125,7 +125,6 @@ TARGET_DEVICES += netgear_dgnd3700-v2 ### Sercomm ### define Device/sercomm_ad1018 $(Device/sercomm-nand) - IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | ad1018-jffs2-cferam | append-ubi | cfe-wfi-tag DEVICE_VENDOR := Sercomm DEVICE_MODEL := AD1018 CHIP_ID := 6328 From 646bfe08422d2604577af8bb4ec8f25ca6798b66 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 14 May 2020 14:16:14 +0100 Subject: [PATCH 04/49] malta: add missing symbols for kernel 5.4 Signed-off-by: Daniel Golle --- target/linux/malta/config-5.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/malta/config-5.4 b/target/linux/malta/config-5.4 index 37d3dbef9a..865be850cb 100644 --- a/target/linux/malta/config-5.4 +++ b/target/linux/malta/config-5.4 @@ -60,11 +60,13 @@ CONFIG_CPU_HAS_PREFETCH=y CONFIG_CPU_HAS_SYNC=y # CONFIG_CPU_MICROMIPS is not set CONFIG_CPU_MIPS32=y +# CONFIG_CPU_MIPS32_3_5_FEATURES is not set CONFIG_CPU_MIPS32_R1=y # CONFIG_CPU_MIPS32_R2 is not set # CONFIG_CPU_MIPS32_R6 is not set # CONFIG_CPU_MIPS64_R1 is not set # CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_MIPS32_R5_FEATURES is not set # CONFIG_CPU_MIPS64_R6 is not set CONFIG_CPU_MIPSR1=y CONFIG_CPU_MIPSR2_IRQ_EI=y From b1f26b7160499c213b84619effc61e6034df589a Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 3 Jun 2020 10:48:35 +0100 Subject: [PATCH 05/49] uhttpd: fix script timeout 939c281 proc: do not cancel script killing after writing headers Signed-off-by: Daniel Golle --- package/network/services/uhttpd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 07baf478ad..a595a7738a 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2020-03-13 -PKG_SOURCE_VERSION:=5e9c23c6f40ff26209ef22cfeeda4904a5918f3d -PKG_MIRROR_HASH:=3ede9616c5a9fbbf9db68eeb083efc605246ec53b7f4404b8dc63b5190646949 +PKG_SOURCE_DATE:=2020-06-03 +PKG_SOURCE_VERSION:=939c281c70ef82929ffcb3cb383fd6fdc40f341b +PKG_MIRROR_HASH:=4cd16ef955fe32ddb579ec79f3d8f636e7100ccecd95be1991e7e4d317090a54 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC From 6dc01cdee8162ca5d23c67443558a051da085add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 3 Jun 2020 13:39:50 +0200 Subject: [PATCH 06/49] bcm63xx: lzma-loader: allow bigger ramdisks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some (older) CFEs are loaded at 0x80401000 and ramdisks are loaded at 0x80010000, which means that ramdisk size limit is 0x3F1000 (almost 4M). Therefore, current ramdisks (~4MB) are overwritting CFE in these devices, which results in a crash. This commit changes the address where ramdisks are loaded to 0x80a00000, which is the same address where kernel is loaded when booting from the flash. Therefore, lzma-loader will now be loaded at 0x80a00000, but it will still decompress the kernel at 0x80010000. Tested with huawei,hg556a-b, which has its CFE loaded at 0x80401000. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/image/Makefile | 3 ++- target/linux/bcm63xx/image/lzma-loader/src/Makefile | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target/linux/bcm63xx/image/Makefile b/target/linux/bcm63xx/image/Makefile index d7e2432bdb..c962e531a9 100644 --- a/target/linux/bcm63xx/image/Makefile +++ b/target/linux/bcm63xx/image/Makefile @@ -15,7 +15,8 @@ LZMA_TEXT_START = 0x81800000 # 32MB - 8MB LOADER_MAKEOPTS= \ KDIR=$(KDIR) \ - LOADADDR=$(KERNEL_LOADADDR) \ + LOADER_ADDR=$(LOADER_ENTRY) \ + KERNEL_ADDR=$(KERNEL_LOADADDR) \ RAMSIZE=$(RAMSIZE) \ LZMA_TEXT_START=$(LZMA_TEXT_START) \ CHIP_ID=$(CHIP_ID) diff --git a/target/linux/bcm63xx/image/lzma-loader/src/Makefile b/target/linux/bcm63xx/image/lzma-loader/src/Makefile index 9115f75af3..0310051a93 100644 --- a/target/linux/bcm63xx/image/lzma-loader/src/Makefile +++ b/target/linux/bcm63xx/image/lzma-loader/src/Makefile @@ -17,7 +17,8 @@ # by the Free Software Foundation. # -LOADADDR := +LOADER_ADDR := +KERNEL_ADDR := LZMA_TEXT_START := 0x80a00000 LOADER_DATA := @@ -49,7 +50,7 @@ OBJECTS := head.o loader.o cache.o board.o printf.o LzmaDecode.o ifneq ($(strip $(LOADER_DATA)),) OBJECTS += data.o -CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(LOADADDR) +CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(KERNEL_ADDR) endif @@ -79,7 +80,7 @@ loader2.o: loader.bin $(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $< loader.elf: loader2.o - $(LD) -e startup -T loader2.lds -Ttext $(LOADADDR) -o $@ $< + $(LD) -e startup -T loader2.lds -Ttext $(LOADER_ADDR) -o $@ $< mrproper: clean From 64ebf74c059f72e91cbed1030d4609b573992295 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 29 May 2020 17:58:20 +0200 Subject: [PATCH 07/49] treewide: drop DEVICE_TYPE when used as device variable DEVICE_TYPE is a target/subtarget variable, and it does not have any effect when set in a device definition. It can only be set in a target's or subtarget's Makefile. Consequently, having it set anyway is misleading, so this drops all cases. This effectively reverts the following commits: 7a1497fd601d ("apm821xx: MBL: set DEVICE_TYPE to NAS") 5b4765c93a1b ("gemini: Classify Raidsonic NAS IB-4220-B as a NAS") cdc6de460bb4 ("gemini: D-Link DNS-313 is a NAS") For the following commit, the variable was set when adding device support: 27b2f0fc0fc5 ("kirkwood: add support for Iomega Storcenter ix2-200") Cc: Christian Lamparter Cc: Sungbo Eo Cc: Linus Walleij Signed-off-by: Adrian Schmutzler --- target/linux/apm821xx/image/Makefile | 1 - target/linux/gemini/image/Makefile | 2 -- target/linux/kirkwood/image/Makefile | 1 - 3 files changed, 4 deletions(-) diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index d732141c8f..c26c015751 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -230,7 +230,6 @@ define Device/wd_mybooklive DEVICE_VENDOR := Western Digital DEVICE_MODEL := My Book Live Series (Single + Duo) DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic - DEVICE_TYPE := nas DEVICE_DTS := wd-mybooklive SUPPORTED_DEVICES += mbl wd,mybooklive-duo BLOCKSIZE := 1k diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile index a155939b8c..83f3d222d9 100644 --- a/target/linux/gemini/image/Makefile +++ b/target/linux/gemini/image/Makefile @@ -171,7 +171,6 @@ define Device/dlink_dns-313 DEVICE_VENDOR := D-Link DEVICE_MODEL := DNS-313 1-Bay Network Storage Enclosure DEVICE_DTS := gemini-dlink-dns-313 - DEVICE_TYPE := nas DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) BLOCKSIZE := 1k FILESYSTEMS := ext4 @@ -204,7 +203,6 @@ define Device/raidsonic_ib-4220-b DEVICE_VENDOR := Raidsonic DEVICE_MODEL := NAS IB-4220-B DEVICE_DTS := gemini-nas4220b - DEVICE_TYPE := nas endef TARGET_DEVICES += raidsonic_ib-4220-b diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index e69e3f125d..552ee44ee4 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -66,7 +66,6 @@ define Device/iom_ix2-200 DEVICE_MODEL := StorCenter ix2-200 DEVICE_DTS := kirkwood-iomega_ix2_200 DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-hwmon-lm63 - DEVICE_TYPE:=nas PAGESIZE := 512 SUBPAGESIZE := 256 BLOCKSIZE := 16k From 057e5f6edee34e6bbd49dfe6f9944a3ba1936719 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 29 May 2020 18:40:03 +0200 Subject: [PATCH 08/49] treewide: provide consistent basic DEVICE_TYPE While the effective "default" based on frequent use is "router", the DEVICE_TYPE variable actually provides a "basic" configuration without selecting any additional packages. This is currently set up with the identifier "bootloader", which seems to be not used at all. However, the only targets not using "router" or "nas" are actually archs38 and arc770, which use their own value "developerboard" for DEVICE_TYPE which seems to have been invented when these targets where added. The latter is not implemented in target.mk, though, and will fall back to the "basic" set of packages then. So, to clean this up and make it more readable, let's just define a DEVICE_TYPE "basic" and use it for the aforementioned cases. Cc: Christian Lamparter Cc: Sungbo Eo Cc: Linus Walleij Signed-off-by: Adrian Schmutzler --- include/target.mk | 3 ++- target/linux/arc770/Makefile | 2 +- target/linux/archs38/Makefile | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/target.mk b/include/target.mk index 9bd4c14936..a2ceb7f783 100644 --- a/include/target.mk +++ b/include/target.mk @@ -14,11 +14,12 @@ DEVICE_TYPE?=router # Default packages - the really basic set DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd +# For the basic set +DEFAULT_PACKAGES.basic:= # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload -DEFAULT_PACKAGES.bootloader:= ifneq ($(DUMP),) all: dumpinfo diff --git a/target/linux/arc770/Makefile b/target/linux/arc770/Makefile index 8150f147c5..018d6e5448 100644 --- a/target/linux/arc770/Makefile +++ b/target/linux/arc770/Makefile @@ -13,7 +13,7 @@ SUBTARGETS:=generic KERNEL_PATCHVER:=4.14 -DEVICE_TYPE:=developerboard +DEVICE_TYPE:=basic define Target/Description Synopsys DesignWare boards diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile index 55708a09b0..5b3650ef8d 100644 --- a/target/linux/archs38/Makefile +++ b/target/linux/archs38/Makefile @@ -14,7 +14,7 @@ SUBTARGETS:=generic KERNEL_PATCHVER:=5.4 -DEVICE_TYPE:=developerboard +DEVICE_TYPE:=basic define Target/Description Synopsys DesignWare boards From 04373e20cbdd4193c86109af354dfc70ccd9e0a9 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 30 May 2020 11:21:08 +0200 Subject: [PATCH 09/49] apm821xx: set DEVICE_TYPE to "nas" for sata subtarget Since DEVICE_TYPE cannot be set per device, just set DEVICE_TYPE to "nas" for the entire subtarget, which only contains this single device. Note that while this looks like a cosmetic change in combination with the previous patches, this particular patch actually changes the packages for the device. Suggested-by: Christian Lamparter Cc: Christian Lamparter Cc: Sungbo Eo Cc: Linus Walleij Signed-off-by: Adrian Schmutzler --- target/linux/apm821xx/sata/target.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/apm821xx/sata/target.mk b/target/linux/apm821xx/sata/target.mk index d3af6ef821..43b1aa0324 100644 --- a/target/linux/apm821xx/sata/target.mk +++ b/target/linux/apm821xx/sata/target.mk @@ -1,4 +1,5 @@ BOARDNAME := Devices which boot from SATA (NAS) +DEVICE_TYPE := nas FEATURES += ext4 usb ramdisk squashfs rootfs-part boot-part DEFAULT_PACKAGES += badblocks block-mount e2fsprogs kmod-hwmon-drivetemp \ kmod-dm kmod-md-mod partx-utils mkf2fs f2fsck From dc467eac38f2447b652b6680cf4af75b05fd6cd2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 29 Mar 2020 18:13:56 -0700 Subject: [PATCH 10/49] prereq-build: test for perl's Data::Dumper Required for installation of autoconf: make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69' Making all in bin make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin' autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg' ../bin/autom4te -B '..'/lib -B '..'/lib --language M4sh --cache '' --melt ./autoconf.as -o autoconf.in Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ../lib/Autom4te/C4che.pm line 33. BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33. Compilation failed in require at ../bin/autom4te line 40. BEGIN failed--compilation aborted at ../bin/autom4te line 40. make[6]: *** [autoconf.in] Error 2 Signed-off-by: Rosen Penev --- include/prereq-build.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 801d2e20b7..f4fa592a7f 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -62,6 +62,10 @@ else zlib_link_flags := -lz endif +$(eval $(call TestHostCommand,perl-data-dumper, \ + Please install the Perl Data::Dumper module, \ + perl -MData::Dumper -e 1)) + $(eval $(call TestHostCommand,perl-thread-queue, \ Please install the Perl Thread::Queue module, \ perl -MThread::Queue -e 1)) From ab841b4393a4077a5819da1da040ab9a89e3b69d Mon Sep 17 00:00:00 2001 From: Alexey Dobrovolsky Date: Sat, 11 Apr 2020 01:37:09 +0300 Subject: [PATCH 11/49] ramips: remove patches for USB-dwc2 In FS#2738 we can see that patch first introduced in e8ebcff ("ramips: add a explicit reset to dwc2") breaks USB functionality since 18.06. Thus, this patch should be removed. Removed: - 0032-USB-dwc2-add-device_reset.patch Fixes: FS#2738 Fixes: FS#2964 Signed-off-by: Alexey Dobrovolsky --- .../0032-USB-dwc2-add-device_reset.patch | 29 ------------------- .../0032-USB-dwc2-add-device_reset.patch | 29 ------------------- 2 files changed, 58 deletions(-) delete mode 100644 target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch delete mode 100644 target/linux/ramips/patches-5.4/0032-USB-dwc2-add-device_reset.patch diff --git a/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch b/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch deleted file mode 100644 index c04e2db661..0000000000 --- a/target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a758e0870c6d1e4b0272f6e7f9efa9face5534bb Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Sun, 27 Jul 2014 09:49:07 +0100 -Subject: [PATCH 32/53] USB: dwc2: add device_reset() - -Signed-off-by: John Crispin ---- - drivers/usb/dwc2/hcd.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/usb/dwc2/hcd.c -+++ b/drivers/usb/dwc2/hcd.c -@@ -48,6 +48,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -5215,6 +5216,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso - - retval = -ENOMEM; - -+ device_reset(hsotg->dev); -+ - hcfg = dwc2_readl(hsotg->regs + HCFG); - dev_dbg(hsotg->dev, "hcfg=%08x\n", hcfg); - diff --git a/target/linux/ramips/patches-5.4/0032-USB-dwc2-add-device_reset.patch b/target/linux/ramips/patches-5.4/0032-USB-dwc2-add-device_reset.patch deleted file mode 100644 index ec837cda93..0000000000 --- a/target/linux/ramips/patches-5.4/0032-USB-dwc2-add-device_reset.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a758e0870c6d1e4b0272f6e7f9efa9face5534bb Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Sun, 27 Jul 2014 09:49:07 +0100 -Subject: [PATCH 32/53] USB: dwc2: add device_reset() - -Signed-off-by: John Crispin ---- - drivers/usb/dwc2/hcd.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/usb/dwc2/hcd.c -+++ b/drivers/usb/dwc2/hcd.c -@@ -49,6 +49,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -5023,6 +5024,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso - - retval = -ENOMEM; - -+ device_reset(hsotg->dev); -+ - hcfg = dwc2_readl(hsotg, HCFG); - dev_dbg(hsotg->dev, "hcfg=%08x\n", hcfg); - From 0a182fcba6d9cb2cf74cae9114ea4770ef928f75 Mon Sep 17 00:00:00 2001 From: Alexey Dobrovolsky Date: Sat, 9 May 2020 21:10:44 +0300 Subject: [PATCH 12/49] ramips: add kmod-usb-dwc2 to ZyXEL Keenetic image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ZyXEL Keenetic has a USB port. Thus, DWC2 USB controller driver should be in the default image for this device. Fixes: a7cbf59e0e04 ("ramips: add new device ZyXEL Keenetic as kn") Signed-off-by: Alexey Dobrovolsky [fixed whitespace issue] Signed-off-by: Petr Štetiar --- target/linux/ramips/image/rt305x.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index d66f0b3a70..3171646b8a 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -1187,7 +1187,8 @@ define Device/zyxel_keenetic IMAGE_SIZE := 7872k DEVICE_VENDOR := ZyXEL DEVICE_MODEL := Keenetic - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport \ + kmod-usb-dwc2 SUPPORTED_DEVICES += kn endef TARGET_DEVICES += zyxel_keenetic From 4a1a58a3e2d2360950ff23a05f1f55b779174d6a Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 14 Apr 2020 11:14:47 -1000 Subject: [PATCH 13/49] build, imagebuilder: Do not require libncurses-dev The buildroot and SDK both require `libncurses-dev` to be installed on the system, however the ImageBuilder uses precompiled binaries. This patch changes the prerequirements checks to skip the `libncurses-dev` part if running as ImageBuilder. Signed-off-by: Paul Spooren --- include/prereq-build.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index f4fa592a7f..83dad0f2dc 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -51,10 +51,12 @@ $(eval $(call TestHostCommand,working-g++, \ g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ $(TMP_DIR)/a.out)) +ifndef IB $(eval $(call TestHostCommand,ncurses, \ Please install ncurses. (Missing libncurses.so or ncurses.h), \ echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses)) +endif ifeq ($(HOST_OS),Linux) zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic From e23859765c3105d382c394e2aa5130f0424c670e Mon Sep 17 00:00:00 2001 From: Thomas Albers Date: Wed, 15 Apr 2020 18:53:13 -0500 Subject: [PATCH 14/49] linux/generic: remove obsolete config option LEDS_TRIGGER_IDE_DISK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kernel config option LEDS_TRIGGER_IDE_DISK was renamed in kernel 4.8 to CONFIG_LEDS_TRIGGER_DISK in upstream commit eb25cb9956cc ("leds: convert IDE trigger to common disk trigger"). Removing it as it should be added only on targets which has usage for this trigger. Signed-off-by: Thomas Albers [commit description facelift] Signed-off-by: Petr Štetiar --- target/linux/generic/config-4.14 | 1 - target/linux/generic/config-4.19 | 1 - target/linux/generic/config-5.4 | 1 - 3 files changed, 3 deletions(-) diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index 5c61df2cc3..99e4075654 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -2380,7 +2380,6 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # CONFIG_LEDS_TRIGGER_DISK is not set # CONFIG_LEDS_TRIGGER_GPIO is not set # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_IDE_DISK is not set # CONFIG_LEDS_TRIGGER_MTD is not set CONFIG_LEDS_TRIGGER_NETDEV=y # CONFIG_LEDS_TRIGGER_ONESHOT is not set diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19 index d3de674623..7e530f347f 100644 --- a/target/linux/generic/config-4.19 +++ b/target/linux/generic/config-4.19 @@ -2513,7 +2513,6 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # CONFIG_LEDS_TRIGGER_DISK is not set # CONFIG_LEDS_TRIGGER_GPIO is not set # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_IDE_DISK is not set # CONFIG_LEDS_TRIGGER_MTD is not set CONFIG_LEDS_TRIGGER_NETDEV=y # CONFIG_LEDS_TRIGGER_ONESHOT is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 3f3f2a05c9..ea4e9a5d3f 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -2684,7 +2684,6 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # CONFIG_LEDS_TRIGGER_DISK is not set # CONFIG_LEDS_TRIGGER_GPIO is not set # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_IDE_DISK is not set # CONFIG_LEDS_TRIGGER_MTD is not set CONFIG_LEDS_TRIGGER_NETDEV=y # CONFIG_LEDS_TRIGGER_ONESHOT is not set From e914de7c96d62c9077ffe9f760b78c86c301ea5a Mon Sep 17 00:00:00 2001 From: Thomas Albers Date: Wed, 3 Jun 2020 13:42:47 +0200 Subject: [PATCH 15/49] base-files: fix LED IDE trigger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This changes the ide-disk LED trigger to the generic disk-activity as ide-disk trigger was removed in upstream commit eb25cb9956cc ("leds: convert IDE trigger to common disk trigger"). Signed-off-by: Thomas Albers [split into separate commit, commit description facelift] Signed-off-by: Petr Štetiar --- package/base-files/files/lib/functions/uci-defaults.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 0d2dcd5241..e551e8fd57 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -404,7 +404,7 @@ ucidef_set_led_gpio() { } ucidef_set_led_ide() { - _ucidef_set_led_trigger "$1" "$2" "$3" ide-disk + _ucidef_set_led_trigger "$1" "$2" "$3" disk-activity } ucidef_set_led_netdev() { From f93fcf8923aa1f89b8190e125ba9fbb435e26045 Mon Sep 17 00:00:00 2001 From: Thomas Albers Date: Thu, 16 Apr 2020 00:23:11 -0500 Subject: [PATCH 16/49] ipq806x: enable disk-activity LED trigger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable the disk-activity LED trigger for ipq806x, since this SoC has an onboard SATA controller. Signed-off-by: Thomas Albers [split into separate commit] Signed-off-by: Petr Štetiar --- target/linux/ipq806x/config-4.19 | 1 + target/linux/ipq806x/config-5.4 | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ipq806x/config-4.19 b/target/linux/ipq806x/config-4.19 index f4c27d7ae8..750057fd34 100644 --- a/target/linux/ipq806x/config-4.19 +++ b/target/linux/ipq806x/config-4.19 @@ -259,6 +259,7 @@ CONFIG_KPSS_XCC=y CONFIG_KRAITCC=y CONFIG_KRAIT_CLOCKS=y CONFIG_KRAIT_L2_ACCESSORS=y +CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y diff --git a/target/linux/ipq806x/config-5.4 b/target/linux/ipq806x/config-5.4 index c9c50c91bc..c9668da356 100644 --- a/target/linux/ipq806x/config-5.4 +++ b/target/linux/ipq806x/config-5.4 @@ -273,6 +273,7 @@ CONFIG_KPSS_XCC=y CONFIG_KRAITCC=y CONFIG_KRAIT_CLOCKS=y CONFIG_KRAIT_L2_ACCESSORS=y +CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y From d71fa37aa3730db7388344ecd072be5655289ecb Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Mon, 20 Apr 2020 00:21:59 +0200 Subject: [PATCH 17/49] uboot-mxs: bump to v2020.04 Also update the U-Boot BSP patch for I2SE Duckbill devices. Signed-off-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 4 +- .../patches/001-add-i2se-duckbill.patch | 66 ++++++++++--------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 3112d673d4..2a202dca8f 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2020.01 +PKG_VERSION:=2020.04 PKG_RELEASE:=1 -PKG_HASH:=aa453c603208b1b27bd03525775a7f79b443adec577fdc6e8f06974025a135f1 +PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 033c843202..50702cb3cb 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -1,6 +1,6 @@ -From b66c70cd15fa02297b94d928970932ef62c2ff02 Mon Sep 17 00:00:00 2001 +From 83ee930c18b068c9a16b66c01aaa5d6e06570152 Mon Sep 17 00:00:00 2001 From: Michael Heimpold -Date: Sun, 3 Nov 2019 00:50:21 +0100 +Date: Sun, 19 Apr 2020 02:46:46 +0200 Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards The Duckbill devices are small, pen-drive sized boards based on @@ -28,13 +28,13 @@ Signed-off-by: Stefan Wahren --- arch/arm/mach-imx/mxs/Kconfig | 5 + board/i2se/duckbill/Kconfig | 15 +++ - board/i2se/duckbill/MAINTAINERS | 6 ++ + board/i2se/duckbill/MAINTAINERS | 6 + board/i2se/duckbill/Makefile | 10 ++ - board/i2se/duckbill/duckbill.c | 186 ++++++++++++++++++++++++++++++++ - board/i2se/duckbill/iomux.c | 156 +++++++++++++++++++++++++++ - configs/duckbill_defconfig | 41 +++++++ - include/configs/duckbill.h | 176 ++++++++++++++++++++++++++++++ - 8 files changed, 595 insertions(+) + board/i2se/duckbill/duckbill.c | 189 ++++++++++++++++++++++++++++++++ + board/i2se/duckbill/iomux.c | 157 ++++++++++++++++++++++++++ + configs/duckbill_defconfig | 43 ++++++++ + include/configs/duckbill.h | 172 +++++++++++++++++++++++++++++ + 8 files changed, 597 insertions(+) create mode 100644 board/i2se/duckbill/Kconfig create mode 100644 board/i2se/duckbill/MAINTAINERS create mode 100644 board/i2se/duckbill/Makefile @@ -44,7 +44,7 @@ Signed-off-by: Stefan Wahren create mode 100644 include/configs/duckbill.h diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig -index 68072d5a1f..82aaa3ef76 100644 +index b90d7b6e41..e7d8bc6792 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT @@ -58,14 +58,14 @@ index 68072d5a1f..82aaa3ef76 100644 config TARGET_MX28EVK bool "Support mx28evk" select BOARD_EARLY_INIT_F -@@ -67,6 +71,7 @@ config SYS_SOC +@@ -70,6 +74,7 @@ config SYS_SOC source "board/bluegiga/apx4devkit/Kconfig" source "board/freescale/mx28evk/Kconfig" +source "board/i2se/duckbill/Kconfig" + source "board/liebherr/xea/Kconfig" source "board/ppcag/bg0900/Kconfig" source "board/schulercontrol/sc_sps_1/Kconfig" - source "board/technologic/ts4600/Kconfig" diff --git a/board/i2se/duckbill/Kconfig b/board/i2se/duckbill/Kconfig new file mode 100644 index 0000000000..98c1e4689f @@ -101,13 +101,13 @@ index 0000000000..5496baa330 +F: configs/duckbill_defconfig diff --git a/board/i2se/duckbill/Makefile b/board/i2se/duckbill/Makefile new file mode 100644 -index 0000000000..0079eb413c +index 0000000000..11bac98e4c --- /dev/null +++ b/board/i2se/duckbill/Makefile @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0+ +# -+# (C) Copyright 2014-2019 ++# (C) Copyright 2014-2020 +# Michael Heimpold, mhei@heimpold.de. + +ifndef CONFIG_SPL_BUILD @@ -117,15 +117,15 @@ index 0000000000..0079eb413c +endif diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c new file mode 100644 -index 0000000000..f93c372611 +index 0000000000..93defc6c28 --- /dev/null +++ b/board/i2se/duckbill/duckbill.c -@@ -0,0 +1,186 @@ +@@ -0,0 +1,189 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * I2SE Duckbill board + * -+ * (C) Copyright 2014-2019 Michael Heimpold ++ * Copyright (C) 2014-2020 Michael Heimpold + */ + +#include @@ -177,14 +177,14 @@ index 0000000000..f93c372611 + return 0; +} + -+#ifdef CONFIG_CMD_MMC ++#ifdef CONFIG_CMD_MMC +int board_mmc_init(bd_t *bis) +{ + return mxsmmc_initialize(bis, 0, NULL, NULL); +} +#endif + -+#ifdef CONFIG_CMD_NET ++#ifdef CONFIG_CMD_NET +int board_eth_init(bd_t *bis) +{ + unsigned int reset_gpio; @@ -198,6 +198,7 @@ index 0000000000..f93c372611 + reset_gpio = MX28_PAD_GPMI_ALE__GPIO_0_26; + + /* Reset PHY */ ++ gpio_request(reset_gpio, "enet0_phy_rst"); + gpio_direction_output(reset_gpio, 0); + udelay(200); + gpio_set_value(reset_gpio, 1); @@ -270,6 +271,7 @@ index 0000000000..f93c372611 + char *s; + + /* Board revision detection */ ++ gpio_request(MX28_PAD_LCD_D17__GPIO_1_17, "board_revision"); + gpio_direction_input(MX28_PAD_LCD_D17__GPIO_1_17); + + /* MX28_PAD_LCD_D17__GPIO_1_17: v1 = pull-down, v2 = pull-up */ @@ -290,6 +292,7 @@ index 0000000000..f93c372611 + led_red_gpio = MX28_PAD_AUART1_RX__GPIO_3_4; + else + led_red_gpio = MX28_PAD_SAIF0_LRCLK__GPIO_3_21; ++ gpio_request(led_red_gpio, "led_red"); + gpio_direction_output(led_red_gpio, 1); + + if (system_rev == 1) @@ -309,15 +312,15 @@ index 0000000000..f93c372611 +} diff --git a/board/i2se/duckbill/iomux.c b/board/i2se/duckbill/iomux.c new file mode 100644 -index 0000000000..1db3c52c34 +index 0000000000..c6cc211181 --- /dev/null +++ b/board/i2se/duckbill/iomux.c -@@ -0,0 +1,156 @@ +@@ -0,0 +1,157 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * I2SE Duckbill IOMUX setup + * -+ * Copyright (C) 2013-2019 Michael Heimpold ++ * Copyright (C) 2013-2020 Michael Heimpold + */ + +#include @@ -462,6 +465,7 @@ index 0000000000..1db3c52c34 +{ + mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup)); + ++ gpio_request(MX28_PAD_LCD_D17__GPIO_1_17, "board_revision"); + gpio_direction_input(MX28_PAD_LCD_D17__GPIO_1_17); + + if (gpio_get_value(MX28_PAD_LCD_D17__GPIO_1_17)) @@ -471,10 +475,10 @@ index 0000000000..1db3c52c34 +} diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig new file mode 100644 -index 0000000000..fcdec4f3c7 +index 0000000000..b2d7fbcf77 --- /dev/null +++ b/configs/duckbill_defconfig -@@ -0,0 +1,41 @@ +@@ -0,0 +1,43 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX28=y +CONFIG_SYS_TEXT_BASE=0x40002000 @@ -510,6 +514,8 @@ index 0000000000..fcdec4f3c7 +CONFIG_CMD_FS_GENERIC=y +CONFIG_DOS_PARTITION=y +CONFIG_ENV_IS_IN_MMC=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_ENV_OFFSET_REDUND=0x40000 +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_MXS_GPIO=y +CONFIG_MMC_MXS=y @@ -518,13 +524,13 @@ index 0000000000..fcdec4f3c7 +CONFIG_OF_LIBFDT=y diff --git a/include/configs/duckbill.h b/include/configs/duckbill.h new file mode 100644 -index 0000000000..76da1008b8 +index 0000000000..565d8c58b7 --- /dev/null +++ b/include/configs/duckbill.h -@@ -0,0 +1,176 @@ +@@ -0,0 +1,172 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* -+ * Copyright (C) 2014-2019 Michael Heimpold ++ * Copyright (C) 2014-2020 Michael Heimpold + * + */ +#ifndef __CONFIGS_DUCKBILL_H__ @@ -545,7 +551,6 @@ index 0000000000..76da1008b8 +/* Environment is in MMC */ +#define CONFIG_ENV_OVERWRITE +#define CONFIG_SYS_MMC_ENV_DEV 0 -+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT + +/* FEC Ethernet on SoC */ +#ifdef CONFIG_CMD_NET @@ -622,9 +627,6 @@ index 0000000000..76da1008b8 + "else " \ + "echo Firmware Update OK; " \ + "fi; setenv error\0" \ -+ "erase_mmc=mmc erase 0 2\0" \ -+ "erase_env1=mmc erase 100 100\0" \ -+ "erase_env2=mmc erase 200 100\0" \ + "image=zImage\0" \ + "console=ttyAMA0\0" \ + "fdt_addr=0x41000000\0" \ @@ -637,8 +639,8 @@ index 0000000000..76da1008b8 + "mmcargs=setenv bootargs console=${console},${baudrate} " \ + "root=${mmcroot} " \ + "rootwait bootsys=${bootsys} panic=1 ${extraargs}\0" \ -+ "loadimage=ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \ -+ "loadfdt=ext4load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/${fdt_file}\0" \ ++ "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \ ++ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/${fdt_file}\0" \ + "mmcboot=echo Booting from mmc ...; " \ + "setexpr mmcpart 1 + ${bootsys}; " \ + "setenv mmcroot /dev/mmcblk0p${mmcpart}; " \ From cf69472fb1ec70a94e3ae880f805dcdf636e33bb Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Mon, 20 Apr 2020 19:47:11 +0200 Subject: [PATCH 18/49] mvebu: espressobin: fix SATA and USB 3.0 ports detection This commit removes changes from upstream commits: 8e18c8e58da6 arm64: dts: marvell: armada-3720-espressobin: declare SATA PHY property bd3d25b07342 arm64: dts: marvell: armada-37xx: link USB hosts with their PHYs For most boards which have factory bootloader this caused that devices connected to USB 3.0 and SATA port were not detected. For them to function users would need to upgrade the bootloader to version with ARM Trusted Firmware 2.1 or later. Unfortunately there is no official bootloader image with updated ATF component, therefore drop these properties from nodes. This change was also tested briefly with bootloader with updated ATF and the ports functioned properly. Signed-off-by: Tomasz Maciej Nowak --- ...l-espressobin-remove-COMPHY-nodes-as.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch diff --git a/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch b/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch new file mode 100644 index 0000000000..75c4688c75 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch @@ -0,0 +1,53 @@ +From e928880bd8b26fd704231549456ae7da88cecda6 Mon Sep 17 00:00:00 2001 +From: Tomasz Maciej Nowak +Date: Mon, 20 Apr 2020 14:35:34 +0200 +Subject: [PATCH] arm64: dts: marvell: espressobin: remove COMPHY nodes + assignmet + +This commit removes changes from upstream commits: +8e18c8e58da6 arm64: dts: marvell: armada-3720-espressobin: declare SATA +PHY property +bd3d25b07342 arm64: dts: marvell: armada-37xx: link USB hosts with their +PHYs +For most boards which have factory bootloader this caused that devices +connected to USB 3.0 and SATA port were not detected. For them to +function users would need to upgrade the bootloader to version with ARM +Trusted Firmware 2.1 or later. Unfortunately there is no official +bootloader image with updated ATF component, therefore drop these +properties from nodes. This change was also tested briefly with +bootloader with updated ATF and the ports functioned properly. + +Signed-off-by: Tomasz Maciej Nowak +--- + arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -54,8 +54,6 @@ + /* J6 */ + &sata { + status = "okay"; +- phys = <&comphy2 0>; +- phy-names = "sata-phy"; + }; + + /* J1 */ +@@ -121,11 +119,17 @@ + /* J7 */ + &usb3 { + status = "okay"; ++ ++ /delete-property/ phys; ++ /delete-property/ phy-names; + }; + + /* J8 */ + &usb2 { + status = "okay"; ++ ++ /delete-property/ phys; ++ /delete-property/ phy-names; + }; + + &mdio { From 2171493f7fc28cb134594a779f08a9797b558444 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 24 Apr 2020 15:43:49 +0200 Subject: [PATCH 19/49] dnsmasq: add /etc/dnsmasq.d/ to conffiles This directory can hold configuration-snippets which should also included in the backup. Signed-off-by: Sven Roederer --- package/network/services/dnsmasq/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index f328d51d2c..ff55d8c545 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_UPSTREAM_VERSION:=2.81 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq @@ -89,6 +89,7 @@ endef define Package/dnsmasq/conffiles /etc/config/dhcp /etc/dnsmasq.conf +/etc/dnsmasq.d/ endef define Package/dnsmasq-full/config From 880c1f0336616b0b5692ff284f83923011c548f2 Mon Sep 17 00:00:00 2001 From: Sergey Ryazanov Date: Fri, 24 Apr 2020 17:04:14 +0300 Subject: [PATCH 20/49] base-files: prevent issues w/ overlay on powerloss after sysupgrade Due to filesystem write caching the old configuration data could stay out of flash for a long time during a first boot after the sysupgrade. Power loss during this period could damage the overlay data and even make device inaccessable via the network. Fix this by syncing data to a flash as soon as the previous configuration will be unpacked after the sysupgrade. Also sync the FS state after the sysupgrade.tgz archive removing to prevent duplicative extraction of a previous configuration. Tested with AMD Geode based board. Signed-off-by: Sergey Ryazanov --- package/base-files/files/etc/init.d/done | 2 +- package/base-files/files/lib/preinit/80_mount_root | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package/base-files/files/etc/init.d/done b/package/base-files/files/etc/init.d/done index 374353a23c..32d6118df7 100755 --- a/package/base-files/files/etc/init.d/done +++ b/package/base-files/files/etc/init.d/done @@ -4,7 +4,7 @@ START=95 boot() { mount_root done - rm -f /sysupgrade.tgz + rm -f /sysupgrade.tgz && sync # process user commands [ -f /etc/rc.local ] && { diff --git a/package/base-files/files/lib/preinit/80_mount_root b/package/base-files/files/lib/preinit/80_mount_root index f3fe788e19..265a3f18df 100644 --- a/package/base-files/files/lib/preinit/80_mount_root +++ b/package/base-files/files/lib/preinit/80_mount_root @@ -9,6 +9,8 @@ do_mount_root() { echo "- config restore -" cd / tar xzf /sysupgrade.tgz + # Prevent configuration corruption on a power loss + sync } } From 1d9812f48aa1f57a8917d3351f0a4f7c8d559755 Mon Sep 17 00:00:00 2001 From: Johann Neuhauser Date: Tue, 28 Apr 2020 23:20:13 +0200 Subject: [PATCH 21/49] ath79: phy-ar7200-usb: do not print error on defered init This is only a cosmetic correction, as the driver works as expected. However, the error message confuses users about a missing reset definition. On a defered init we don't see the following error message now: [ 0.078292] ar7200-usb-phy usb-phy: phy reset is missing Tested-by: Lech Perczak Signed-off-by: Johann Neuhauser --- .../ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch | 5 +++-- .../ath79/patches-5.4/0004-phy-add-ath79-usb-phys.patch | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch index fa3487d392..3629e6e875 100644 --- a/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch +++ b/target/linux/ath79/patches-4.19/0004-phy-add-ath79-usb-phys.patch @@ -194,7 +194,7 @@ Signed-off-by: John Crispin +MODULE_LICENSE("GPL"); --- /dev/null +++ b/drivers/phy/phy-ar7200-usb.c -@@ -0,0 +1,135 @@ +@@ -0,0 +1,136 @@ +/* + * Copyright (C) 2015 Alban Bedel + * @@ -265,7 +265,8 @@ Signed-off-by: John Crispin + + priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy"); + if (IS_ERR(priv->rst_phy)) { -+ dev_err(&pdev->dev, "phy reset is missing\n"); ++ if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER) ++ dev_err(&pdev->dev, "phy reset is missing\n"); + return PTR_ERR(priv->rst_phy); + } + diff --git a/target/linux/ath79/patches-5.4/0004-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-5.4/0004-phy-add-ath79-usb-phys.patch index 7956edb937..e319f738a5 100644 --- a/target/linux/ath79/patches-5.4/0004-phy-add-ath79-usb-phys.patch +++ b/target/linux/ath79/patches-5.4/0004-phy-add-ath79-usb-phys.patch @@ -194,7 +194,7 @@ Signed-off-by: John Crispin +MODULE_LICENSE("GPL"); --- /dev/null +++ b/drivers/phy/phy-ar7200-usb.c -@@ -0,0 +1,135 @@ +@@ -0,0 +1,136 @@ +/* + * Copyright (C) 2015 Alban Bedel + * @@ -265,7 +265,8 @@ Signed-off-by: John Crispin + + priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy"); + if (IS_ERR(priv->rst_phy)) { -+ dev_err(&pdev->dev, "phy reset is missing\n"); ++ if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER) ++ dev_err(&pdev->dev, "phy reset is missing\n"); + return PTR_ERR(priv->rst_phy); + } + From 0b3e1205df64f14a7a06d354abc574cb59cad0c3 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 29 Apr 2020 15:54:06 +0200 Subject: [PATCH 22/49] kernel: add gpio-it87 Since commit 910df3f06cc902ca2cb0ca8e963e9354c930df1a we have build in on all X86/64 platforms the gpio-it87 driver. Since this change I am getting the following error message on boot. > kern.err kernel: [ 1.009416] gpio_it87: no device I do not have this device on my system. To prevent the nonsensical message and the loading of the module I have added this as a package, so that it can be installed later or during image building. Signed-off-by: Florian Eckert Reviewed-by: Philip Prindeville --- package/kernel/linux/modules/other.mk | 18 ++++++++++++++++++ target/linux/x86/64/config-4.19 | 2 +- target/linux/x86/64/config-5.4 | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index f05c758340..2cd4765196 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -295,6 +295,24 @@ endef $(eval $(call KernelPackage,gpio-pcf857x)) +define KernelPackage/gpio-it87 + SUBMENU:=$(OTHER_MENU) + DEPENDS:=@GPIO_SUPPORT @TARGET_x86 + TITLE:=GPIO support for IT87xx Super I/O chips + KCONFIG:=CONFIG_GPIO_IT87 + FILES:=$(LINUX_DIR)/drivers/gpio/gpio-it87.ko + AUTOLOAD:=$(call AutoLoad,25,gpio-it87,1) +endef + +define KernelPackage/gpio-it87/description + This driver is tested with ITE IT8728 and IT8732 Super I/O chips, and + supports the IT8761E, IT8613, IT8620E, and IT8628E Super I/O chips as + well. +endef + +$(eval $(call KernelPackage,gpio-it87)) + + define KernelPackage/ppdev SUBMENU:=$(OTHER_MENU) TITLE:=Parallel port support diff --git a/target/linux/x86/64/config-4.19 b/target/linux/x86/64/config-4.19 index 00ed09a4a6..eafae899dd 100644 --- a/target/linux/x86/64/config-4.19 +++ b/target/linux/x86/64/config-4.19 @@ -218,7 +218,7 @@ CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_ICH=y -CONFIG_GPIO_IT87=y +# CONFIG_GPIO_IT87 is not set CONFIG_GPIO_LYNXPOINT=y CONFIG_GPIO_SCH=y CONFIG_GPIO_SYSFS=y diff --git a/target/linux/x86/64/config-5.4 b/target/linux/x86/64/config-5.4 index 2c2d06e750..1b44103d11 100644 --- a/target/linux/x86/64/config-5.4 +++ b/target/linux/x86/64/config-5.4 @@ -192,7 +192,7 @@ CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_ICH=y -CONFIG_GPIO_IT87=y +# CONFIG_GPIO_IT87 is not set CONFIG_GPIO_LYNXPOINT=y CONFIG_GPIO_SCH=y CONFIG_GPIO_SYSFS=y From 173d2843c7d9a8007e3d2874b1f3bb909df6c95a Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 22 May 2020 16:16:47 -0700 Subject: [PATCH 23/49] libconfig: move into packages feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No package in base uses libconfig. Everything is in the packages feed. Ref: https://github.com/openwrt/packages/pull/12255 Signed-off-by: Rosen Penev [subject facelift, PR ref] Signed-off-by: Petr Štetiar --- package/libs/libconfig/Makefile | 60 --------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 package/libs/libconfig/Makefile diff --git a/package/libs/libconfig/Makefile b/package/libs/libconfig/Makefile deleted file mode 100644 index 39fcddf082..0000000000 --- a/package/libs/libconfig/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2008-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libconfig -PKG_VERSION:=1.7.2 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://hyperrealm.github.io/libconfig/dist/ -PKG_HASH:=7c3c7a9c73ff3302084386e96f903eb62ce06953bb1666235fac74363a16fad9 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_MAINTAINER:=Felix Fietkau -PKG_LICENSE:=LGPL-2.1+ - -include $(INCLUDE_DIR)/package.mk - -define Package/libconfig - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Configuration File Library - URL:=http://www.hyperrealm.com/libconfig/ - ABI_VERSION:=11 -endef - -define Package/libconfig/description - Libconfig is a simple library for manipulating structured configuration - files. This file format is more compact and more readable than XML. And - unlike XML, it is type-aware, so it is not necessary to do string - parsing in application code. - - Libconfig is very compact -- just 38K for the stripped C shared - library (less than one-fourth the size of the expat XML parser library) - and 66K for the stripped C++ shared library. This makes it well-suited - for memory-constrained systems like handheld devices. -endef - -CONFIGURE_ARGS += \ - --enable-shared \ - --disable-static \ - --disable-cxx - -define Build/InstallDev - $(CP) $(PKG_INSTALL_DIR)/* $(1)/ -endef - -define Package/libconfig/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libconfig)) From e86b67e700248ce4f92e95f2dfedc44db8148d45 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 22 May 2020 16:22:57 -0700 Subject: [PATCH 24/49] xfsprogs: move into packages feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Does not seem to be needed here. This will be imported into packages. Ref: https://github.com/openwrt/packages/pull/12256 Signed-off-by: Rosen Penev [subject facelift, PR ref] Signed-off-by: Petr Štetiar --- package/utils/xfsprogs/Makefile | 98 ------------------- .../xfsprogs/patches/100-no-selftest.patch | 14 --- .../utils/xfsprogs/patches/110-subdirs.patch | 12 --- .../xfsprogs/patches/120-disable_assert.patch | 12 --- ...six_memalign-instead-of-deprecated-v.patch | 26 ----- .../patches/140-copy-file-range.patch | 48 --------- 6 files changed, 210 deletions(-) delete mode 100644 package/utils/xfsprogs/Makefile delete mode 100644 package/utils/xfsprogs/patches/100-no-selftest.patch delete mode 100644 package/utils/xfsprogs/patches/110-subdirs.patch delete mode 100644 package/utils/xfsprogs/patches/120-disable_assert.patch delete mode 100644 package/utils/xfsprogs/patches/130-db-malloc-Use-posix_memalign-instead-of-deprecated-v.patch delete mode 100644 package/utils/xfsprogs/patches/140-copy-file-range.patch diff --git a/package/utils/xfsprogs/Makefile b/package/utils/xfsprogs/Makefile deleted file mode 100644 index f717185bb6..0000000000 --- a/package/utils/xfsprogs/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright (C) 2006-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=xfsprogs -PKG_CPE_ID:=cpe:/a:sgi:xfsprogs -PKG_RELEASE:=4 -PKG_VERSION:=4.11.0 -PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs -PKG_HASH:=c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/xfsprogs/default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Filesystem - DEPENDS:=+libuuid +libpthread +librt - URL:=http://oss.sgi.com/projects/xfs -endef - -define Package/xfs-admin -$(call Package/xfsprogs/default) - TITLE:=Utilities for changing parameters of an XFS filesystems -endef - -define Package/xfs-mkfs -$(call Package/xfsprogs/default) - TITLE:=Utility for creating XFS filesystems -endef - -define Package/xfs-fsck -$(call Package/xfsprogs/default) - TITLE:=Utilities for checking and repairing XFS filesystems -endef - -define Package/xfs-growfs -$(call Package/xfsprogs/default) - TITLE:=Utility for increasing the size of XFS filesystems -endef - -CONFIGURE_ARGS += \ - --enable-gettext=no \ - --enable-lib64=no \ - --enable-blkid=no - -TARGET_CFLAGS += \ - -I$(STAGING_DIR)/usr/include \ - -D_LARGEFILE64_SOURCE \ - -D_FILE_OFFSET_BITS=64 \ - -D_GNU_SOURCE - -MAKE_FLAGS += \ - DEBUG= Q= \ - PCFLAGS="-Wall" \ - PKG_PLATFORM=linux \ - ENABLE_GETTEXT=no - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/libxfs crc32table.h CFLAGS="$(HOST_CFLAGS) -I$(PKG_BUILD_DIR)/include" - $(call Build/Compile/Default) -endef - -define Package/xfs-admin/install - mkdir -p $(1)/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_admin $(1)/sbin -endef - -define Package/xfs-mkfs/install - mkdir -p $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/usr/sbin -endef - -define Package/xfs-fsck/install - mkdir -p $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/usr/sbin -endef - -define Package/xfs-growfs/install - mkdir -p $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/usr/sbin -endef - -$(eval $(call BuildPackage,xfs-admin)) -$(eval $(call BuildPackage,xfs-mkfs)) -$(eval $(call BuildPackage,xfs-fsck)) -$(eval $(call BuildPackage,xfs-growfs)) diff --git a/package/utils/xfsprogs/patches/100-no-selftest.patch b/package/utils/xfsprogs/patches/100-no-selftest.patch deleted file mode 100644 index 2270166753..0000000000 --- a/package/utils/xfsprogs/patches/100-no-selftest.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/libxfs/Makefile -+++ b/libxfs/Makefile -@@ -118,9 +118,9 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT) - # don't try linking xfs_repair with a debug libxfs. - DEBUG = -DNDEBUG - --LDIRT = gen_crc32table crc32table.h crc32selftest -+LDIRT = gen_crc32table crc32table.h - --default: crc32selftest ltdepend $(LTLIBRARY) -+default: ltdepend $(LTLIBRARY) - - crc32table.h: gen_crc32table.c - @echo " [CC] gen_crc32table" diff --git a/package/utils/xfsprogs/patches/110-subdirs.patch b/package/utils/xfsprogs/patches/110-subdirs.patch deleted file mode 100644 index 53a6b09ce2..0000000000 --- a/package/utils/xfsprogs/patches/110-subdirs.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -46,8 +46,7 @@ HDR_SUBDIRS = include libxfs - - DLIB_SUBDIRS = libxlog libxcmd libhandle - LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS) --TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \ -- mdrestore repair rtcp m4 man doc debian -+TOOL_SUBDIRS = db fsck growfs io mkfs repair - - ifneq ("$(PKG_PLATFORM)","darwin") - TOOL_SUBDIRS += fsr diff --git a/package/utils/xfsprogs/patches/120-disable_assert.patch b/package/utils/xfsprogs/patches/120-disable_assert.patch deleted file mode 100644 index 9a970d27ae..0000000000 --- a/package/utils/xfsprogs/patches/120-disable_assert.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libxfs/libxfs_priv.h -+++ b/libxfs/libxfs_priv.h -@@ -84,9 +84,6 @@ extern uint32_t crc32c_le(uint32_t crc, - /* for all the support code that uses progname in error messages */ - extern char *progname; - --#undef ASSERT --#define ASSERT(ex) assert(ex) -- - #ifndef EWRONGFS - #define EWRONGFS EINVAL - #endif diff --git a/package/utils/xfsprogs/patches/130-db-malloc-Use-posix_memalign-instead-of-deprecated-v.patch b/package/utils/xfsprogs/patches/130-db-malloc-Use-posix_memalign-instead-of-deprecated-v.patch deleted file mode 100644 index b028db1878..0000000000 --- a/package/utils/xfsprogs/patches/130-db-malloc-Use-posix_memalign-instead-of-deprecated-v.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 930f9aa8f08759fa739dd6e615ba8b3a1890008d Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Mon, 6 May 2019 13:56:13 -0700 -Subject: [PATCH] db/malloc: Use posix_memalign instead of deprecated valloc - -valloc is not available with uClibc-ng as well as being deprecated, which -causes compilation errors. aligned_alloc is not available before C11 so -used posix_memalign.' - -Signed-off-by: Rosen Penev ---- - db/malloc.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - ---- a/db/malloc.c -+++ b/db/malloc.c -@@ -56,8 +56,7 @@ xmalloc( - { - void *ptr; - -- ptr = valloc(size); -- if (ptr) -+ if(!posix_memalign(&ptr, sysconf(_SC_PAGESIZE), size)) - return ptr; - badmalloc(); - /* NOTREACHED */ diff --git a/package/utils/xfsprogs/patches/140-copy-file-range.patch b/package/utils/xfsprogs/patches/140-copy-file-range.patch deleted file mode 100644 index 076d5c95da..0000000000 --- a/package/utils/xfsprogs/patches/140-copy-file-range.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 8041435de7ed028a27ecca64302945ad455c69a6 Mon Sep 17 00:00:00 2001 -From: "Darrick J. Wong" -Date: Mon, 5 Feb 2018 14:38:02 -0600 -Subject: [PATCH] xfs_io: fix copy_file_range symbol name collision - -glibc 2.27 has a copy_file_range wrapper, so we need to change our -internal function out of the way to avoid compiler warnings. - -Reported-by: fredrik@crux.nu -Signed-off-by: Darrick J. Wong -Reviewed-by: Eric Sandeen -Signed-off-by: Eric Sandeen ---- - io/copy_file_range.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - ---- a/io/copy_file_range.c -+++ b/io/copy_file_range.c -@@ -42,13 +42,18 @@ copy_range_help(void) - ")); - } - -+/* -+ * Issue a raw copy_file_range syscall; for our test program we don't want the -+ * glibc buffered copy fallback. -+ */ - static loff_t --copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len) -+copy_file_range_cmd(int fd, loff_t *src, loff_t *dst, size_t len) - { - loff_t ret; - - do { -- ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, len, 0); -+ ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, -+ len, 0); - if (ret == -1) { - perror("copy_range"); - return errno; -@@ -130,7 +135,7 @@ copy_range_f(int argc, char **argv) - copy_dst_truncate(); - } - -- ret = copy_file_range(fd, &src, &dst, len); -+ ret = copy_file_range_cmd(fd, &src, &dst, len); - close(fd); - return ret; - } From a9f712a79b700400286ede2671c879f42b9ebb6b Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 26 Apr 2020 16:17:30 -0700 Subject: [PATCH 25/49] exfat-utils: move into packages feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will be moved to packages: https://github.com/openwrt/packages/pull/12378 Signed-off-by: Rosen Penev [commit subject facelift] Signed-off-by: Petr Štetiar --- package/utils/exfat-utils/Makefile | 69 ------------------------------ 1 file changed, 69 deletions(-) delete mode 100644 package/utils/exfat-utils/Makefile diff --git a/package/utils/exfat-utils/Makefile b/package/utils/exfat-utils/Makefile deleted file mode 100644 index ef2b59606d..0000000000 --- a/package/utils/exfat-utils/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=exfat-utils -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPL-2.0 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_VERSION)? -PKG_HASH:=7d4e95c3042b58601a581dc02f55eb4a726a2fb8db2e74a9619dbf3083997e06 - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_MAINTAINER:=Daniel Golle - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_ARGS += \ - --enable-shared \ - --disable-static - -define Package/exfat-utils/Default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Filesystem - DEPENDS:=+libexfat - URL:=https://github.com/exfat-utils/exfat-utils -endef - -define Package/exfat-mkfs - $(Package/exfat-utils/Default) - TITLE:=Utility for creating an exFAT File System -endef - -define Package/exfat-fsck - $(Package/exfat-utils/Default) - TITLE:=Utility for checking/repairing an exFAT File System -endef - -define Package/libexfat - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Library for exFAT File System tools - DEPENDS:=+libuuid - ABI_VERSION:=1 -endef - -define Package/libexfat/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libexfat.so.* $(1)/usr/lib/ -endef - -define Package/exfat-mkfs/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.exfat $(1)/usr/sbin -endef - -define Package/exfat-fsck/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.exfat $(1)/usr/sbin -endef - -$(eval $(call BuildPackage,libexfat)) -$(eval $(call BuildPackage,exfat-mkfs)) -$(eval $(call BuildPackage,exfat-fsck)) From 750d52f6c90e2a144c250779741607f0cb306a94 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 26 May 2020 10:45:22 -0300 Subject: [PATCH 26/49] wolfssl: use -fomit-frame-pointer to fix asm error 32-bit x86 fail to compile fast-math feature when compiled with frame pointer, which uses a register used in a couple of inline asm functions. Previous versions of wolfssl had this by default. Keeping an extra register available may increase performance, so it's being restored for all architectures. Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index b186a087e7..159cfbc53f 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl PKG_VERSION:=4.4.0-stable -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) @@ -56,7 +56,7 @@ define Package/libwolfssl/config source "$(SOURCE)/Config.in" endef -TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 +TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 -fomit-frame-pointer # --enable-stunnel needed for OpenSSL API compatibility bits CONFIGURE_ARGS += \ From 3b1e99d23e24b20e7b3d5f1801556a385c3d35a0 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Thu, 28 May 2020 06:56:17 -0700 Subject: [PATCH 27/49] imx6: backport v5.8 imx6qdl-gw dt patches - add fxos8700 support to GW52xx/GW53xx/GW54xx - add USB_OTG support to GW552x - add LSM9DS1 IMU support to GW560x - add LSM9DS1 IMU support to GW5904 - add CC1352 UART to GW5910 - add BCM4330 support to GW5910 - fix wlan regulator for GW5910 Signed-off-by: Tim Harvey --- ...ana-add-fxos8700-on-gateworks-boards.patch | 66 ++++++++++++++ ...M-dts-imx6qdl-gw5910-add-CC1352-UART.patch | 59 +++++++++++++ ...s-imx6qdl-gw552x-add-USB-OTG-support.patch | 50 +++++++++++ ...gw560x-add-lsm9ds1-iio-imu-magn-supp.patch | 81 +++++++++++++++++ ...gw5904-add-lsm9ds1-iio-imu-magn-supp.patch | 74 ++++++++++++++++ ...dl-gw5910-add-support-for-bcm4330-bt.patch | 87 +++++++++++++++++++ ...ts-imx6qdl-gw5910-fix-wlan-regulator.patch | 38 ++++++++ 7 files changed, 455 insertions(+) create mode 100644 target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch create mode 100644 target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch create mode 100644 target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch create mode 100644 target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch create mode 100644 target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch create mode 100644 target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch create mode 100644 target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch diff --git a/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch new file mode 100644 index 0000000000..e2c8980a43 --- /dev/null +++ b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx-ventana-add-fxos8700-on-gateworks-boards.patch @@ -0,0 +1,66 @@ +From 66d19a4f8d0fa7539f90cad64d793b4dac6f6e5d Mon Sep 17 00:00:00 2001 +From: Robert Jones +Date: Fri, 14 Feb 2020 13:01:55 -0800 +Subject: [PATCH] ARM: dts: imx: ventana: add fxos8700 on gateworks boards + +Add fxos8700 iio imu entries for Gateworks ventana SBCs. + +Signed-off-by: Robert Jones +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 5 +++++ + arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 5 +++++ + arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 5 +++++ + 3 files changed, 15 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +index 1a9a9d9..60563ff 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +@@ -313,6 +313,11 @@ + interrupts = <12 2>; + wakeup-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; + }; ++ ++ accel@1e { ++ compatible = "nxp,fxos8700"; ++ reg = <0x1e>; ++ }; + }; + + &ldb { +diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +index 54b2bea..8942bec 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +@@ -304,6 +304,11 @@ + interrupts = <11 2>; + wakeup-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; + }; ++ ++ accel@1e { ++ compatible = "nxp,fxos8700"; ++ reg = <0x1e>; ++ }; + }; + + &ldb { +diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +index 1b6c133..c40583d 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +@@ -361,6 +361,11 @@ + interrupts = <12 2>; + wakeup-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; + }; ++ ++ accel@1e { ++ compatible = "nxp,fxos8700"; ++ reg = <0x1e>; ++ }; + }; + + &ldb { +-- +2.7.4 + diff --git a/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch new file mode 100644 index 0000000000..5f5dc0aed1 --- /dev/null +++ b/target/linux/imx6/patches-5.4/006-v5.7-ARM-dts-imx6qdl-gw5910-add-CC1352-UART.patch @@ -0,0 +1,59 @@ +From d2cf2f91ba5b6d7696b1870e28017a3e1a7a1bb8 Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Fri, 28 Feb 2020 11:46:07 -0800 +Subject: [PATCH] ARM: dts: imx6qdl-gw5910: add CC1352 UART + +The GW5910-C revision adds a TI CC1352 connected to IMX UART4 + +Signed-off-by: Tim Harvey +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +index be1af74..30fe47f 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +@@ -220,6 +220,14 @@ + status = "okay"; + }; + ++/* cc1352 */ ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart3>; ++ uart-has-rtscts; ++ status = "okay"; ++}; ++ + /* Sterling-LWB Bluetooth */ + &uart4 { + pinctrl-names = "default"; +@@ -411,6 +419,23 @@ + >; + }; + ++ pinctrl_uart3: uart3grp { ++ fsl,pins = < ++ MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1 ++ MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1 ++ MX6QDL_PAD_EIM_D23__UART3_RTS_B 0x1b0b1 ++ MX6QDL_PAD_EIM_D31__UART3_CTS_B 0x1b0b1 ++ MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x4001b0b1 /* DIO20 */ ++ MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x4001b0b1 /* DIO14 */ ++ MX6QDL_PAD_DISP0_DAT12__GPIO5_IO06 0x4001b0b1 /* DIO15 */ ++ MX6QDL_PAD_DISP0_DAT14__GPIO5_IO08 0x1b0b1 /* TMS */ ++ MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09 0x1b0b1 /* TCK */ ++ MX6QDL_PAD_DISP0_DAT16__GPIO5_IO10 0x1b0b1 /* TDO */ ++ MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11 0x1b0b1 /* TDI */ ++ MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x4001b0b1 /* RST# */ ++ >; ++ }; ++ + pinctrl_uart4: uart4grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1 +-- +2.7.4 + diff --git a/target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch b/target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch new file mode 100644 index 0000000000..b0ac409f7e --- /dev/null +++ b/target/linux/imx6/patches-5.4/006-v5.8-ARM-dts-imx6qdl-gw552x-add-USB-OTG-support.patch @@ -0,0 +1,50 @@ +From 957743b79b1ebb710f5498b61a212cebc302e685 Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Wed, 29 Apr 2020 08:22:35 -0700 +Subject: [PATCH 01/20] ARM: dts: imx6qdl-gw552x: add USB OTG support + +The GW552x-B board revision adds USB OTG support. + +Enable the device-tree node and configure the OTG_ID pin. + +Signed-off-by: Tim Harvey +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6qdl-gw552x.dtsi b/arch/arm/boot/dts/imx6qdl-gw552x.dtsi +index dc646b7..bb35971 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw552x.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw552x.dtsi +@@ -258,6 +258,14 @@ + status = "okay"; + }; + ++&usbotg { ++ vbus-supply = <®_5p0v>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usbotg>; ++ disable-over-current; ++ status = "okay"; ++}; ++ + &wdog1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_wdog>; +@@ -359,6 +367,12 @@ + >; + }; + ++ pinctrl_usbotg: usbotggrp { ++ fsl,pins = < ++ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x13059 ++ >; ++ }; ++ + pinctrl_wdog: wdoggrp { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT8__WDOG1_B 0x1b0b0 +-- +2.7.4 + diff --git a/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch b/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch new file mode 100644 index 0000000000..cb8f17222a --- /dev/null +++ b/target/linux/imx6/patches-5.4/007-v5.8-ARM-dts-imx6qdl-gw560x-add-lsm9ds1-iio-imu-magn-supp.patch @@ -0,0 +1,81 @@ +From 9e72702a3d9a967edac02d8e937bce2b68b77814 Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Tue, 12 May 2020 13:59:37 -0700 +Subject: [PATCH 05/20] ARM: dts: imx6qdl-gw560x: add lsm9ds1 iio imu/magn + support + +Add one node for the accel/gyro i2c device and another for the separate +magnetometer device in the lsm9ds1. + +Signed-off-by: Tim Harvey +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx6qdl-gw560x.dtsi | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6qdl-gw560x.dtsi b/arch/arm/boot/dts/imx6qdl-gw560x.dtsi +index e8e36df..69ca70d 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw560x.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw560x.dtsi +@@ -295,6 +295,15 @@ + VDDIO-supply = <®_3p3v>; + }; + ++ magn@1c { ++ compatible = "st,lsm9ds1-magn"; ++ reg = <0x1c>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_mag>; ++ interrupt-parent = <&gpio5>; ++ interrupts = <9 IRQ_TYPE_EDGE_RISING>; ++ }; ++ + tca8418: keypad@34 { + compatible = "ti,tca8418"; + pinctrl-names = "default"; +@@ -389,6 +398,16 @@ + }; + }; + }; ++ ++ imu@6a { ++ compatible = "st,lsm9ds1-imu"; ++ reg = <0x6a>; ++ st,drdy-int-pin = <1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_imu>; ++ interrupt-parent = <&gpio5>; ++ interrupts = <6 IRQ_TYPE_LEVEL_HIGH>; ++ }; + }; + + &i2c3 { +@@ -609,6 +628,12 @@ + >; + }; + ++ pinctrl_imu: imugrp { ++ fsl,pins = < ++ MX6QDL_PAD_DISP0_DAT12__GPIO5_IO06 0x1b0b0 ++ >; ++ }; ++ + pinctrl_keypad: keypadgrp { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11 0x0001b0b0 /* KEYPAD_IRQ# */ +@@ -616,6 +641,12 @@ + >; + }; + ++ pinctrl_mag: maggrp { ++ fsl,pins = < ++ MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09 0x1b0b0 ++ >; ++ }; ++ + pinctrl_pcie: pciegrp { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT10__GPIO4_IO31 0x1b0b0 /* PCI_RST# */ +-- +2.7.4 + diff --git a/target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch b/target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch new file mode 100644 index 0000000000..9befdbe0a0 --- /dev/null +++ b/target/linux/imx6/patches-5.4/008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch @@ -0,0 +1,74 @@ +From c8756cbad816954be912ba32277ccd55fe7acc01 Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Tue, 12 May 2020 13:59:56 -0700 +Subject: [PATCH 06/20] ARM: dts: imx6qdl-gw5904: add lsm9ds1 iio imu/magn + support + +Add one node for the accel/gyro i2c device and another for the separate +magnetometer device in the lsm9ds1. + +Signed-off-by: Tim Harvey +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx6qdl-gw5904.dtsi | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi +index 6d21cc6..76d6cf5 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi +@@ -248,6 +248,15 @@ + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; + ++ magn@1c { ++ compatible = "st,lsm9ds1-magn"; ++ reg = <0x1c>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_mag>; ++ interrupt-parent = <&gpio5>; ++ interrupts = <17 IRQ_TYPE_EDGE_RISING>; ++ }; ++ + ltc3676: pmic@3c { + compatible = "lltc,ltc3676"; + reg = <0x3c>; +@@ -320,6 +329,16 @@ + }; + }; + }; ++ ++ imu@6a { ++ compatible = "st,lsm9ds1-imu"; ++ reg = <0x6a>; ++ st,drdy-int-pin = <1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_imu>; ++ interrupt-parent = <&gpio4>; ++ interrupts = <18 IRQ_TYPE_LEVEL_HIGH>; ++ }; + }; + + &i2c3 { +@@ -501,6 +520,18 @@ + >; + }; + ++ pinctrl_imu: imugrp { ++ fsl,pins = < ++ MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x1b0b0 ++ >; ++ }; ++ ++ pinctrl_mag: maggrp { ++ fsl,pins = < ++ MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x1b0b0 ++ >; ++ }; ++ + pinctrl_pcie: pciegrp { + fsl,pins = < + MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0 /* PCIE RST */ +-- +2.7.4 + diff --git a/target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch b/target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch new file mode 100644 index 0000000000..ca11c5462a --- /dev/null +++ b/target/linux/imx6/patches-5.4/009-v5.8-ARM-dts-imx6qdl-gw5910-add-support-for-bcm4330-bt.patch @@ -0,0 +1,87 @@ +From d40edafe80569c5b4d8893c1cdd1060c54ef433c Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Tue, 12 May 2020 14:54:15 -0700 +Subject: [PATCH 07/20] ARM: dts: imx6qdl-gw5910: add support for bcm4330-bt + +The Sterling-LWB has a BCM4330 which has a UART based bluetooth +HCI. Add support for binding to the bcm_hci driver to take care +of handling the shutdown gpio and loading firmware. + +Because the shutdown gpio is more of an enable than a regulator +go ahead and replace the regulator with a shutdown-gpio. + +Signed-off-by: Tim Harvey +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 32 ++++++++++++-------------------- + 1 file changed, 12 insertions(+), 20 deletions(-) + +diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +index 30fe47f..b850f8f 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +@@ -83,19 +83,6 @@ + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; +- +- reg_bt: regulator-bt { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_reg_bt>; +- compatible = "regulator-fixed"; +- regulator-name = "bt"; +- gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>; +- startup-delay-us = <100>; +- enable-active-high; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- regulator-always-on; +- }; + }; + + +@@ -231,9 +218,14 @@ + /* Sterling-LWB Bluetooth */ + &uart4 { + pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_uart4>; ++ pinctrl-0 = <&pinctrl_uart4>,<&pinctrl_bten>; + uart-has-rtscts; + status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm4330-bt"; ++ shutdown-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; ++ }; + }; + + /* GPS */ +@@ -288,6 +280,12 @@ + >; + }; + ++ pinctrl_bten: btengrp { ++ fsl,pins = < ++ MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x1b0b1 ++ >; ++ }; ++ + pinctrl_ecspi3: escpi3grp { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1 +@@ -393,12 +391,6 @@ + >; + }; + +- pinctrl_reg_bt: regbtgrp { +- fsl,pins = < +- MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x1b0b1 +- >; +- }; +- + pinctrl_reg_wl: regwlgrp { + fsl,pins = < + MX6QDL_PAD_GPIO_5__GPIO1_IO05 0x1b0b1 +-- +2.7.4 + diff --git a/target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch b/target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch new file mode 100644 index 0000000000..8a9158ae00 --- /dev/null +++ b/target/linux/imx6/patches-5.4/010-v5.8-ARM-dts-imx6qdl-gw5910-fix-wlan-regulator.patch @@ -0,0 +1,38 @@ +From 4792ff641cc8993606013d27d84cda59d8cc76c5 Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Tue, 12 May 2020 15:02:34 -0700 +Subject: [PATCH 08/20] ARM: dts: imx6qdl-gw5910: fix wlan regulator + +Connect the wl_reg regulator to usdhc2 such that it can be enabled +and disabled as needed. There is no need for this to be always-on. + +Signed-off-by: Tim Harvey +Signed-off-by: Shawn Guo +--- + arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +index b850f8f..0857de5 100644 +--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi ++++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi +@@ -81,7 +81,6 @@ + enable-active-high; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; +- regulator-always-on; + }; + }; + +@@ -251,7 +250,7 @@ + &usdhc2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; +- vmmc-supply = <®_3p3v>; ++ vmmc-supply = <®_wl>; + non-removable; + bus-width = <4>; + status = "okay"; +-- +2.7.4 + From 0562037c3b7b99e58149267068bdaa6c4c83a64a Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Thu, 28 May 2020 06:57:05 -0700 Subject: [PATCH 28/49] imx6: image: increase max ubifs file-system size The latest 2GiB NAND flash parts used by Gateworks ventana are 2K page-size. Signed-off-by: Tim Harvey --- target/linux/imx6/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index 232dc4225f..2c9d03c039 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -35,7 +35,7 @@ define Build/boot-overlay $(STAGING_DIR_HOST)/bin/mkfs.ubifs \ --space-fixup --compr=zlib --squash-uids \ - $(MKUBIFS_OPTS) -c 8124 \ + $(MKUBIFS_OPTS) -c 16248 \ -o $@.boot.ubifs -d $@.boot $(TAR) -C $@.boot -cf $@.boot.tar . From c3f9598339c1c528dae2d0d7a2f5f5e3b48663e2 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 2 Jun 2020 10:05:01 -0700 Subject: [PATCH 29/49] octeontx: refresh kernel 5.4 config refresh kernel config by running make kernel_menuconfig and saving changes Signed-off-by: Tim Harvey --- target/linux/octeontx/config-5.4 | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/target/linux/octeontx/config-5.4 b/target/linux/octeontx/config-5.4 index a75bf78d35..cfb8b19e4e 100644 --- a/target/linux/octeontx/config-5.4 +++ b/target/linux/octeontx/config-5.4 @@ -1,6 +1,4 @@ CONFIG_64BIT=y -# CONFIG_ARCH_AGILEX is not set -# CONFIG_ARCH_BITMAIN is not set CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y @@ -83,9 +81,7 @@ CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y CONFIG_ARCH_WANT_FRAME_POINTERS=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARM64=y -# CONFIG_ARM64_16K_PAGES is not set CONFIG_ARM64_4K_PAGES=y -# CONFIG_ARM64_64K_PAGES is not set CONFIG_ARM64_CNP=y CONFIG_ARM64_CONT_SHIFT=4 CONFIG_ARM64_CRYPTO=y @@ -97,17 +93,12 @@ CONFIG_ARM64_ERRATUM_826319=y CONFIG_ARM64_ERRATUM_827319=y CONFIG_ARM64_ERRATUM_843419=y CONFIG_ARM64_HW_AFDBM=y -# CONFIG_ARM64_LSE_ATOMICS is not set CONFIG_ARM64_MODULE_PLTS=y CONFIG_ARM64_PAGE_SHIFT=12 CONFIG_ARM64_PAN=y CONFIG_ARM64_PA_BITS=48 CONFIG_ARM64_PA_BITS_48=y -# CONFIG_ARM64_PMEM is not set -# CONFIG_ARM64_PSEUDO_NMI is not set -# CONFIG_ARM64_PTDUMP_DEBUGFS is not set CONFIG_ARM64_PTR_AUTH=y -# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set CONFIG_ARM64_SSBD=y CONFIG_ARM64_SVE=y CONFIG_ARM64_TAGGED_ADDR_ABI=y @@ -131,7 +122,6 @@ CONFIG_ARM_GIC_V3_ITS_PCI=y CONFIG_ARM_PSCI_FW=y CONFIG_ARM_SBSA_WATCHDOG=y # CONFIG_ARM_SCMI_PROTOCOL is not set -# CONFIG_ARM_SP805_WATCHDOG is not set CONFIG_ATA=y # CONFIG_ATA_SFF is not set CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y @@ -167,8 +157,6 @@ CONFIG_COMMON_CLK=y CONFIG_COMMON_CLK_CS2000_CP=y CONFIG_CONFIGFS_FS=y CONFIG_CONTIG_ALLOC=y -# CONFIG_CPU_BIG_ENDIAN is not set -# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y @@ -190,7 +178,6 @@ CONFIG_CRYPTO_AES_ARM64_CE_BLK=y CONFIG_CRYPTO_AES_ARM64_CE_CCM=y # CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set CONFIG_CRYPTO_ANSI_CPRNG=y -# CONFIG_CRYPTO_CHACHA20_NEON is not set CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRCT10DIF=y @@ -209,7 +196,6 @@ CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_NHPOLY1305_NEON is not set CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG=y @@ -247,9 +233,7 @@ CONFIG_EEPROM_AT24=y CONFIG_EFI_EARLYCON=y CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y -# CONFIG_F2FS_CHECK_FS is not set CONFIG_F2FS_FS=y -# CONFIG_F2FS_FS_SECURITY is not set CONFIG_F2FS_FS_XATTR=y CONFIG_F2FS_STAT_FS=y CONFIG_FANOTIFY=y @@ -261,7 +245,6 @@ CONFIG_FONT_AUTOSELECT=y CONFIG_FONT_SUPPORT=y CONFIG_FRAME_POINTER=y CONFIG_FREEZER=y -# CONFIG_FSL_QDMA is not set CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y CONFIG_FS_POSIX_ACL=y @@ -299,7 +282,6 @@ CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_THUNDERX=y -# CONFIG_GVE is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y @@ -372,6 +354,8 @@ CONFIG_HWSPINLOCK=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_CAVIUM=y CONFIG_HW_RANDOM_OPTEE=y +CONFIG_HZ=250 +CONFIG_HZ_250=y CONFIG_I2C=y CONFIG_I2C_ALGOBIT=y CONFIG_I2C_BOARDINFO=y @@ -429,12 +413,8 @@ CONFIG_MDIO_DEVICE=y CONFIG_MDIO_THUNDER=y CONFIG_MEMFD_CREATE=y CONFIG_MEMORY_BALLOON=y -# CONFIG_MEMORY_HOTPLUG is not set CONFIG_MEMORY_ISOLATION=y CONFIG_MEMTEST=y -# CONFIG_MFD_LOCHNAGAR is not set -# CONFIG_MFD_ROHM_BD70528 is not set -# CONFIG_MFD_STPMIC1 is not set CONFIG_MFD_SYSCON=y CONFIG_MIGRATION=y CONFIG_MMC=y @@ -461,7 +441,6 @@ CONFIG_NUMA=y CONFIG_NUMA_BALANCING=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_NVMEM=y -# CONFIG_NVMEM_REBOOT_MODE is not set CONFIG_NVMEM_SYSFS=y # CONFIG_OCTEONTX2_AF is not set CONFIG_OF=y @@ -483,7 +462,6 @@ CONFIG_PCI=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y # CONFIG_PCIE_AL is not set -# CONFIG_PCIE_BW is not set CONFIG_PCIE_PME=y CONFIG_PCI_ATS=y CONFIG_PCI_DOMAINS=y @@ -494,7 +472,6 @@ CONFIG_PCI_HOST_GENERIC=y CONFIG_PCI_HOST_THUNDER_ECAM=y CONFIG_PCI_HOST_THUNDER_PEM=y CONFIG_PCI_IOV=y -# CONFIG_PCI_MESON is not set CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PGTABLE_LEVELS=4 @@ -502,7 +479,6 @@ CONFIG_PHYLIB=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PM=y CONFIG_PM_CLK=y -# CONFIG_PM_DEBUG is not set CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y CONFIG_PM_STD_PARTITION="" @@ -515,7 +491,6 @@ CONFIG_POWER_SUPPLY=y CONFIG_PROC_VMCORE=y CONFIG_QUEUED_RWLOCKS=y CONFIG_QUEUED_SPINLOCKS=y -# CONFIG_RANDOMIZE_BASE is not set CONFIG_RAS=y CONFIG_RATIONAL=y # CONFIG_RAVE_SP_CORE is not set From 3fd8e86079b21459c744b61b466b12c69ed3ab24 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Thu, 28 May 2020 07:58:34 -0700 Subject: [PATCH 30/49] octeontx: fix gpio irq request This fixes a regression in 5.4 that causes a crash when a driver requests an ARM GPIO for an IRQ. Signed-off-by: Tim Harvey --- ...o-thunderx-fix-irq_request_resources.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch diff --git a/target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch b/target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch new file mode 100644 index 0000000000..8c4de51aae --- /dev/null +++ b/target/linux/octeontx/patches-5.4/0002-gpio-thunderx-fix-irq_request_resources.patch @@ -0,0 +1,46 @@ +From e8287ec10f21877eb0ac4c1fb4e89e42d8bc10da Mon Sep 17 00:00:00 2001 +From: Tim Harvey +Date: Wed, 11 Mar 2020 08:19:45 -0700 +Subject: [PATCH 2/7] gpio: thunderx: fix irq_request_resources + +If there are no parent resources do not call irq_chip_request_resources_parent +at all as this will return an error. + +This resolves a regression where devices using a thunderx gpio as an interrupt +would fail probing. + +Fixes: 0d04d0c ("gpio: thunderx: Use the default parent apis for {request,release}_resources") +Signed-off-by: Tim Harvey +--- + drivers/gpio/gpio-thunderx.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c +index 715371b..feda2a2 100644 +--- a/drivers/gpio/gpio-thunderx.c ++++ b/drivers/gpio/gpio-thunderx.c +@@ -363,15 +363,18 @@ static int thunderx_gpio_irq_request_resources(struct irq_data *data) + { + struct thunderx_line *txline = irq_data_get_irq_chip_data(data); + struct thunderx_gpio *txgpio = txline->txgpio; ++ struct irq_data *parent_data = data->parent_data; + int r; + + r = gpiochip_lock_as_irq(&txgpio->chip, txline->line); + if (r) + return r; + +- r = irq_chip_request_resources_parent(data); +- if (r) +- gpiochip_unlock_as_irq(&txgpio->chip, txline->line); ++ if (parent_data && parent_data->chip->irq_request_resources) { ++ r = irq_chip_request_resources_parent(data); ++ if (r) ++ gpiochip_unlock_as_irq(&txgpio->chip, txline->line); ++ } + + return r; + } +-- +2.7.4 + From 0cf101d6b39a10952420af0f300a0784190887ff Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Thu, 28 May 2020 07:58:49 -0700 Subject: [PATCH 31/49] octeontx: fix mcp251x can controller Update the can-mcp251x-convert-to-half-duplex-SPI patch to fix reception Some SPI host controllers such as the Cavium Thunder TX do not support full-duplex SPI. Using half-duplex transfers allows the driver to work with those host controllers. This patch fixes the fact that mcp251x_hw_rx_frame was still relying on a full-duplex transfer where bits were being shifted on MOSI at the same time as MISO. After splitting the transaction into a spi_write_then_read() care must be taken to ignore the first byte. Signed-off-by: Tim Harvey --- ...n-mcp251x-convert-to-half-duplex-SPI.patch | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch b/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch index 6096fcf2be..54906b786e 100644 --- a/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch +++ b/target/linux/octeontx/patches-5.4/0003-can-mcp251x-convert-to-half-duplex-SPI.patch @@ -1,20 +1,22 @@ -From 6edfb172ff1dd3cfc84c19790c245a4005474bb7 Mon Sep 17 00:00:00 2001 +From 097cc81ee5c15913ad330baffff2e3dea09bdad0 Mon Sep 17 00:00:00 2001 From: Tim Harvey -Date: Tue, 25 Feb 2020 12:01:36 -0800 -Subject: [PATCH 03/12] can: mcp251x: convert to half-duplex SPI +Date: Thu, 30 Aug 2018 15:16:08 -0700 +Subject: [PATCH] can: mcp251x: convert driver to half-duplex SPI -Some SPI host controllers such as the Cavium Thunder do not support +Some SPI host controllers such as the Cavium Thunder TX do not support full-duplex SPI. Using half-duplex transfers allows the driver to work with those host controllers. Signed-off-by: Tim Harvey --- - drivers/net/can/spi/mcp251x.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + drivers/net/can/spi/mcp251x.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) +diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c +index bb20a9b..dc0574a 100644 --- a/drivers/net/can/spi/mcp251x.c +++ b/drivers/net/can/spi/mcp251x.c -@@ -291,23 +291,23 @@ static u8 mcp251x_read_reg(struct spi_de +@@ -291,23 +291,23 @@ static u8 mcp251x_read_reg(struct spi_device *spi, u8 reg) priv->spi_tx_buf[0] = INSTRUCTION_READ; priv->spi_tx_buf[1] = reg; @@ -43,3 +45,18 @@ Signed-off-by: Tim Harvey } static void mcp251x_write_reg(struct spi_device *spi, u8 reg, u8 val) +@@ -398,8 +398,9 @@ static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf, + buf[i] = mcp251x_read_reg(spi, RXBCTRL(buf_idx) + i); + } else { + priv->spi_tx_buf[RXBCTRL_OFF] = INSTRUCTION_READ_RXB(buf_idx); +- mcp251x_spi_trans(spi, SPI_TRANSFER_BUF_LEN); +- memcpy(buf, priv->spi_rx_buf, SPI_TRANSFER_BUF_LEN); ++ spi_write_then_read(spi, priv->spi_tx_buf, 1, priv->spi_rx_buf, ++ SPI_TRANSFER_BUF_LEN); ++ memcpy(buf + 1, priv->spi_rx_buf, SPI_TRANSFER_BUF_LEN - 1); + } + } + +-- +2.7.4 + From 41cab5029b66f3e58683689fc79d90374e01e741 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Thu, 28 May 2020 08:02:01 -0700 Subject: [PATCH 32/49] kernel: iio: fix st_accel_{i2c, spi} driver Add missing kernel module and rename driver Fixes: 2d8f4c4fbd46 ("kernel: iio: add st-accel driver modules") Signed-off-by: Tim Harvey --- package/kernel/linux/modules/iio.mk | 46 ++++++++++++++++------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index 17ffdc3441..b52ec8c8cd 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -328,20 +328,40 @@ endef $(eval $(call KernelPackage,iio-st_accel)) -define KernelPackage/iio-st_sensors-i2c +define KernelPackage/iio-st_accel-i2c SUBMENU:=$(IIO_MENU) TITLE:=STMicroelectronics accelerometer 3-Axis Driver (I2C) DEPENDS:=+kmod-iio-st_accel +kmod-i2c-core +kmod-regmap-i2c KCONFIG:= CONFIG_IIO_ST_ACCEL_I2C_3AXIS - FILES:=$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_i2c.ko - AUTOLOAD:=$(call AutoLoad,56,st_sensors_i2c) + FILES:= \ + $(LINUX_DIR)/drivers/iio/accel/st_accel_i2c.ko \ + $(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_i2c.ko + AUTOLOAD:=$(call AutoLoad,56,st_accel_i2c) endef -define KernelPackage/iio-st_sensors-i2c/description +define KernelPackage/iio-st_accel-i2c/description This package adds support for STMicroelectronics I2C based accelerometers endef -$(eval $(call KernelPackage,iio-st_sensors-i2c)) +$(eval $(call KernelPackage,iio-st_accel-i2c)) + + +define KernelPackage/iio-st_accel-spi + SUBMENU:=$(IIO_MENU) + TITLE:=STMicroelectronics accelerometer 3-Axis Driver (SPI) + DEPENDS:=+kmod-iio-st_accel +kmod-regmap-spi + KCONFIG:= CONFIG_IIO_ST_ACCEL_SPI_3AXIS + FILES:= \ + $(LINUX_DIR)/drivers/iio/accel/st_accel_spi.ko \ + $(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_spi.ko + AUTOLOAD:=$(call AutoLoad,56,st_accel_spi) +endef + +define KernelPackage/iio-st_accel-spi/description + This package adds support for STMicroelectronics SPI based accelerometers +endef + +$(eval $(call KernelPackage,iio-st_accel-spi)) define KernelPackage/iio-sps30 @@ -360,22 +380,6 @@ endef $(eval $(call KernelPackage,iio-sps30)) -define KernelPackage/iio-st_sensors-spi - SUBMENU:=$(IIO_MENU) - TITLE:=STMicroelectronics accelerometer 3-Axis Driver (SPI) - DEPENDS:=+kmod-iio-st_accel +kmod-regmap-spi - KCONFIG:= CONFIG_IIO_ST_ACCEL_SPI_3AXIS - FILES:=$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_spi.ko - AUTOLOAD:=$(call AutoLoad,56,st_sensors_spi) -endef - -define KernelPackage/iio-st_sensors-spi/description - This package adds support for STMicroelectronics SPI based accelerometers -endef - -$(eval $(call KernelPackage,iio-st_sensors-spi)) - - define KernelPackage/iio-tsl4531 SUBMENU:=$(IIO_MENU) DEPENDS:=+kmod-i2c-core +kmod-iio-core From 25641709d87d710c13bd558d681713ae1a5f11b1 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Thu, 28 May 2020 08:04:42 -0700 Subject: [PATCH 33/49] kernel: iio: add drivers for st_lsm6dsx IMU MEMS sensors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add kmod for the ST LSM6DSX IMU driver. Signed-off-by: Tim Harvey [fixed missing regmap module dependencies] Signed-off-by: Petr Štetiar --- package/kernel/linux/modules/iio.mk | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index b52ec8c8cd..ab14e97a05 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -364,6 +364,54 @@ endef $(eval $(call KernelPackage,iio-st_accel-spi)) +define KernelPackage/iio-lsm6dsx + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-iio-core +kmod-iio-kfifo-buf +kmod-regmap-core + TITLE:=ST LSM6DSx driver for IMU MEMS sensors + KCONFIG:=CONFIG_IIO_ST_LSM6DSX + FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.ko + AUTOLOAD:=$(call AutoProbe,st_lsm6dsx) +endef + +define KernelPackage/iio-lsm6dsx/description + Support for the ST LSM6DSx and related IMU MEMS sensors. +endef + +$(eval $(call KernelPackage,iio-lsm6dsx)) + + +define KernelPackage/iio-lsm6dsx-i2c + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-iio-lsm6dsx +kmod-i2c-core +kmod-regmap-i2c + TITLE:=ST LSM6DSx driver for IMU MEMS sensors (I2C) + KCONFIG:=CONFIG_IIO_ST_LSM6DSX + FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko + AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-i2c) +endef + +define KernelPackage/iio-lsm6dsx-i2c/description + Support for the ST LSM6DSx and related IMU MEMS I2C sensors. +endef + +$(eval $(call KernelPackage,iio-lsm6dsx-i2c)) + + +define KernelPackage/iio-lsm6dsx-spi + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-iio-lsm6dsx +kmod-regmap-spi + TITLE:=ST LSM6DSx driver for IMU MEMS sensors (SPI) + KCONFIG:=CONFIG_IIO_ST_LSM6DSX + FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko + AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-spi) +endef + +define KernelPackage/iio-lsm6dsx-spi/description + Support for the ST LSM6DSx and related IMU MEMS SPI sensors. +endef + +$(eval $(call KernelPackage,iio-lsm6dsx-spi)) + + define KernelPackage/iio-sps30 SUBMENU:=$(IIO_MENU) DEPENDS:=@!LINUX_4_14 +kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer +kmod-lib-crc8 From 6ea87d35c671f50d86cc7f2969e3930e03e3ea31 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Sun, 31 May 2020 16:42:23 +0900 Subject: [PATCH 34/49] bcm47xx: fix brcm-wl module loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _dma_cache_wback_inv needs to be exported to load wl module successfully. root@OpenWrt:/# insmod wl [ 363.867779] wl: Unknown symbol _dma_cache_wback_inv (err -2) failed to insert /lib/modules/5.4.40/wl.ko Signed-off-by: Sungbo Eo Cc: Rafał Miłecki --- target/linux/bcm47xx/patches-5.4/999-wl_exports.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/bcm47xx/patches-5.4/999-wl_exports.patch b/target/linux/bcm47xx/patches-5.4/999-wl_exports.patch index 607c552885..7dcf028ab1 100644 --- a/target/linux/bcm47xx/patches-5.4/999-wl_exports.patch +++ b/target/linux/bcm47xx/patches-5.4/999-wl_exports.patch @@ -12,10 +12,11 @@ static int cfe_env; --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c -@@ -62,6 +62,8 @@ void (*_dma_cache_wback_inv)(unsigned lo +@@ -62,6 +62,9 @@ void (*_dma_cache_wback_inv)(unsigned lo void (*_dma_cache_wback)(unsigned long start, unsigned long size); void (*_dma_cache_inv)(unsigned long start, unsigned long size); ++EXPORT_SYMBOL(_dma_cache_wback_inv); +EXPORT_SYMBOL(_dma_cache_inv); + #endif /* CONFIG_DMA_NONCOHERENT */ From 7f0fb3e5d432340677c41a6284b75aaf7dd9b97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 3 Jun 2020 14:55:10 +0200 Subject: [PATCH 35/49] iwinfo: update to version 2020-06-03 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2faa20e5e9d1 iwinfo: add device id for Mikrotik R11e-5HacD miniPCIe card d577a9d38a3b iwinfo: add device id for Marvell 88W8997 SDIO wifi card f6b7d16d2ffa iwinfo: add device id for Atheros AR9287 PCIe wifi card Signed-off-by: Petr Štetiar --- package/network/utils/iwinfo/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index b1b60e671c..fd2d836bdb 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2020-03-22 -PKG_SOURCE_VERSION:=9f5a7c4f9b78cb2de8fe5dd7af55bf0221706402 -PKG_MIRROR_HASH:=d62cae4b3d2f65c189f179c3dabf1c8c244c5de801439c483ea87dcf8e85b476 +PKG_SOURCE_DATE:=2020-06-03 +PKG_SOURCE_VERSION:=2faa20e5e9d107b97e393a4eb458370e80b4d720 +PKG_MIRROR_HASH:=c5094a1751cbc610a91d21b7ddbec85c4f80d51dddb249fdcabb327ab1e2523f PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 From 2f5a242f6762ce7233168785f1eb1ebcd1e4bd36 Mon Sep 17 00:00:00 2001 From: Tobias Schramm Date: Wed, 3 Jun 2020 15:10:40 +0200 Subject: [PATCH 36/49] ramips: mt7621: use higher SPI clock speed on Mikrotik rbm11g and rbm33g Previously the dts were using a value determined by empirical testing, because of a spi driver/clock bug. The bug was fixed quite some time ago. 33 MHz is the default clock frequency used by RouterBOOT and thus safe. Signed-off-by: Tobias Schramm --- target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts | 3 +-- target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts index 2b05f1c2f2..cb13590017 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts @@ -83,8 +83,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - // XXX empiric value to obtain actual 10MHz SCK at the chip - spi-max-frequency = <3125000>; + spi-max-frequency = <33000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts index 490f507fa9..ebe85b09a1 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts @@ -93,7 +93,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <3125000>; + spi-max-frequency = <33000000>; partitions { compatible = "fixed-partitions"; @@ -139,8 +139,7 @@ flash@1 { compatible = "jedec,spi-nor"; reg = <1>; - // XXX empiric value to obtain actual 10MHz SCK at the chip - spi-max-frequency = <3125000>; + spi-max-frequency = <33000000>; partitions { compatible = "fixed-partitions"; From 6c7cbf1420a3a1757ce62d94bb89c71564b38ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 3 Jun 2020 18:44:50 +0200 Subject: [PATCH 37/49] kernel: mtdsplit: bcm_wfi: always add img partitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is useful when booting OpenWrt from ramdisks in order to have both images partitions defined. Furthermore, instead of always using img2 for the inactive image, let's use img1 or img2 accordingly. Signed-off-by: Álvaro Fernández Rojas --- .../drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c | 53 +++++++++++++++---- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c index 56bcff31c2..1ddcf6745f 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_bcm_wfi.c @@ -27,6 +27,7 @@ #define char_to_num(c) ((c >= '0' && c <= '9') ? (c - '0') : (0)) #define BCM_WFI_PARTS 3 +#define BCM_WFI_SPLIT_PARTS 2 #define CFERAM_NAME "cferam" #define CFERAM_NAME_LEN (sizeof(CFERAM_NAME) - 1) @@ -46,6 +47,11 @@ #define SERCOMM_MAGIC "eRcOmM.000" #define SERCOMM_MAGIC_LEN (sizeof(SERCOMM_MAGIC) - 1) +#define PART_CFERAM "cferam" +#define PART_FIRMWARE "firmware" +#define PART_IMAGE_1 "img1" +#define PART_IMAGE_2 "img2" + static u32 jffs2_dirent_crc(struct jffs2_raw_dirent *node) { return crc32(0, node, sizeof(struct jffs2_raw_dirent) - 8); @@ -187,14 +193,14 @@ static int parse_bcm_wfi(struct mtd_info *master, return -ENOMEM; if (cfe_part) { - parts[cur_part].name = "cferam"; + parts[cur_part].name = PART_CFERAM; parts[cur_part].mask_flags = MTD_WRITEABLE; parts[cur_part].offset = cfe_off; parts[cur_part].size = kernel_off - cfe_off; cur_part++; } - parts[cur_part].name = "firmware"; + parts[cur_part].name = PART_FIRMWARE; parts[cur_part].offset = kernel_off; parts[cur_part].size = size - (kernel_off - off); cur_part++; @@ -273,6 +279,7 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master, const struct mtd_partition **pparts, struct mtd_part_parser_data *data) { + struct mtd_partition *parts; loff_t cfe_off; loff_t img1_off = 0; loff_t img2_off = master->size / 2; @@ -280,6 +287,7 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master, loff_t img2_size = (master->size - img2_off); loff_t active_off, inactive_off; loff_t active_size, inactive_size; + const char *inactive_name; uint8_t *buf; char *cfe1_name = NULL, *cfe2_name = NULL; size_t cfe1_size = 0, cfe2_size = 0; @@ -314,11 +322,13 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master, active_size = img1_size; inactive_off = img2_off; inactive_size = img2_size; + inactive_name = PART_IMAGE_2; } else { active_off = img2_off; active_size = img2_size; inactive_off = img1_off; inactive_size = img1_size; + inactive_name = PART_IMAGE_1; } ret = parse_bcm_wfi(master, pparts, buf, active_off, active_size, true); @@ -326,8 +336,6 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master, kfree(buf); if (ret > 0) { - struct mtd_partition *parts; - parts = kzalloc((ret + 1) * sizeof(*parts), GFP_KERNEL); if (!parts) return -ENOMEM; @@ -335,11 +343,23 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master, memcpy(parts, *pparts, ret * sizeof(*parts)); kfree(*pparts); - parts[ret].name = "img2"; + parts[ret].name = inactive_name; parts[ret].offset = inactive_off; parts[ret].size = inactive_size; ret++; + *pparts = parts; + } else { + parts = kzalloc(BCM_WFI_SPLIT_PARTS * sizeof(*parts), GFP_KERNEL); + + parts[0].name = PART_IMAGE_1; + parts[0].offset = img1_off; + parts[0].size = img1_size; + + parts[1].name = PART_IMAGE_2; + parts[1].offset = img2_off; + parts[1].size = img2_size; + *pparts = parts; } @@ -387,14 +407,15 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master, const struct mtd_partition **pparts, struct mtd_part_parser_data *data) { + struct mtd_partition *parts; struct mtd_info *mtd_bf1, *mtd_bf2; - struct erase_info bf_erase; loff_t img1_off = 0; loff_t img2_off = master->size / 2; loff_t img1_size = (img2_off - img1_off); loff_t img2_size = (master->size - img2_off); loff_t active_off, inactive_off; loff_t active_size, inactive_size; + const char *inactive_name; uint8_t *buf; int bf1, bf2; int ret; @@ -420,6 +441,8 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master, printk("sercomm: bootflag2=%d\n", bf2); if (bf1 == bf2 && bf2 >= 0) { + struct erase_info bf_erase; + bf2 = -ENOENT; bf_erase.addr = 0; bf_erase.len = mtd_bf2->size; @@ -431,11 +454,13 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master, active_size = img1_size; inactive_off = img2_off; inactive_size = img2_size; + inactive_name = PART_IMAGE_2; } else { active_off = img2_off; active_size = img2_size; inactive_off = img1_off; inactive_size = img1_size; + inactive_name = PART_IMAGE_1; } ret = parse_bcm_wfi(master, pparts, buf, active_off, active_size, false); @@ -443,8 +468,6 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master, kfree(buf); if (ret > 0) { - struct mtd_partition *parts; - parts = kzalloc((ret + 1) * sizeof(*parts), GFP_KERNEL); if (!parts) return -ENOMEM; @@ -452,11 +475,23 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master, memcpy(parts, *pparts, ret * sizeof(*parts)); kfree(*pparts); - parts[ret].name = "img2"; + parts[ret].name = inactive_name; parts[ret].offset = inactive_off; parts[ret].size = inactive_size; ret++; + *pparts = parts; + } else { + parts = kzalloc(BCM_WFI_SPLIT_PARTS * sizeof(*parts), GFP_KERNEL); + + parts[0].name = PART_IMAGE_1; + parts[0].offset = img1_off; + parts[0].size = img1_size; + + parts[1].name = PART_IMAGE_2; + parts[1].offset = img2_off; + parts[1].size = img2_size; + *pparts = parts; } From e8aac7013a447c15a11cc6215e2180abd8af658a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 3 Jun 2020 19:03:42 +0200 Subject: [PATCH 38/49] bcm63xx: vr-3032u: fix WFI partition size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each image can take up to 0x3d60000, which means 128k more per image. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/dts/bcm63168-comtrend-vr-3032u.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/bcm63xx/dts/bcm63168-comtrend-vr-3032u.dts b/target/linux/bcm63xx/dts/bcm63168-comtrend-vr-3032u.dts index af44b66756..7c5d5b453c 100644 --- a/target/linux/bcm63xx/dts/bcm63168-comtrend-vr-3032u.dts +++ b/target/linux/bcm63xx/dts/bcm63168-comtrend-vr-3032u.dts @@ -174,7 +174,7 @@ partition@20000 { compatible = "brcm,wfi-split"; label = "wfi"; - reg = <0x0020000 0x7a80000>; + reg = <0x0020000 0x7ac0000>; }; }; }; From 8421ea7de1d8549198dcaa6f9ec345cd92d2dcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 3 Jun 2020 19:06:22 +0200 Subject: [PATCH 39/49] bcm63xx: vg-8050: fix WFI partition size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each image can take up to 0x3d60000, which means 128k more per image. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts b/target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts index 01158a3791..3e3de99441 100644 --- a/target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts +++ b/target/linux/bcm63xx/dts/bcm63169-comtrend-vg-8050.dts @@ -187,7 +187,7 @@ partition@20000 { compatible = "brcm,wfi-split"; label = "wfi"; - reg = <0x0020000 0x7a80000>; + reg = <0x0020000 0x7ac0000>; }; }; }; From 5fcb0723a3199a296bb0ee7a3eec28d27cd37bd4 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 28 May 2020 18:46:47 +0200 Subject: [PATCH 40/49] mvebu: switch to kernel 5.4 Last reports with kernel 5.4 have all been positive [1], so let's open this to a wider range of testers. [1] https://github.com/openwrt/openwrt/pull/2804 Signed-off-by: Adrian Schmutzler --- target/linux/mvebu/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile index b954a88f6d..b9a6a79fe5 100644 --- a/target/linux/mvebu/Makefile +++ b/target/linux/mvebu/Makefile @@ -11,7 +11,7 @@ BOARDNAME:=Marvell EBU Armada FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part SUBTARGETS:=cortexa9 cortexa53 cortexa72 -KERNEL_PATCHVER:=4.19 +KERNEL_PATCHVER:=5.4 KERNEL_TESTING_PATCHVER:=5.4 include $(INCLUDE_DIR)/target.mk From a2bca5c92209df96d9d9dbe3044da2c7358b05a0 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sun, 19 Apr 2020 15:33:19 +0800 Subject: [PATCH 41/49] mvebu: drop swconfig patches Drop swconfig patches for Clearfog and Linksys WRT Signed-off-by: DENG Qingfang --- .../patches-4.19/003-add_switch_nodes.patch | 40 ------------------- .../210-clearfog_switch_node.patch | 21 ---------- .../220-disable-untested-dsa-boards.patch | 30 -------------- .../patches-5.4/003-add_switch_nodes.patch | 40 ------------------- .../210-clearfog_switch_node.patch | 21 ---------- .../220-disable-untested-dsa-boards.patch | 30 -------------- 6 files changed, 182 deletions(-) delete mode 100644 target/linux/mvebu/patches-4.19/003-add_switch_nodes.patch delete mode 100644 target/linux/mvebu/patches-4.19/210-clearfog_switch_node.patch delete mode 100644 target/linux/mvebu/patches-4.19/220-disable-untested-dsa-boards.patch delete mode 100644 target/linux/mvebu/patches-5.4/003-add_switch_nodes.patch delete mode 100644 target/linux/mvebu/patches-5.4/210-clearfog_switch_node.patch delete mode 100644 target/linux/mvebu/patches-5.4/220-disable-untested-dsa-boards.patch diff --git a/target/linux/mvebu/patches-4.19/003-add_switch_nodes.patch b/target/linux/mvebu/patches-4.19/003-add_switch_nodes.patch deleted file mode 100644 index b208638916..0000000000 --- a/target/linux/mvebu/patches-4.19/003-add_switch_nodes.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -@@ -257,6 +257,16 @@ - }; - }; - }; -+ -+ mvsw61xx { -+ compatible = "marvell,88e6172"; -+ status = "okay"; -+ reg = <0x10>; -+ -+ mii-bus = <&mdio>; -+ cpu-port-0 = <5>; -+ cpu-port-1 = <6>; -+ }; - }; - - &pciec { ---- a/arch/arm/boot/dts/armada-385-linksys.dtsi -+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi -@@ -82,6 +82,18 @@ - linux,default-trigger = "disk-activity"; - }; - }; -+ -+ mvsw61xx { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ compatible = "marvell,88e6176"; -+ status = "okay"; -+ reg = <0x10>; -+ -+ mii-bus = <&mdio>; -+ cpu-port-0 = <5>; -+ cpu-port-1 = <6>; -+ }; - }; - - &ahci0 { diff --git a/target/linux/mvebu/patches-4.19/210-clearfog_switch_node.patch b/target/linux/mvebu/patches-4.19/210-clearfog_switch_node.patch deleted file mode 100644 index f9677a82f2..0000000000 --- a/target/linux/mvebu/patches-4.19/210-clearfog_switch_node.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/arch/arm/boot/dts/armada-388-clearfog.dts -+++ b/arch/arm/boot/dts/armada-388-clearfog.dts -@@ -88,6 +88,18 @@ - }; - }; - -+ mvsw61xx { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ compatible = "marvell,88e6176"; -+ status = "okay"; -+ reg = <0x4>; -+ is-indirect; -+ -+ mii-bus = <&mdio>; -+ cpu-port-0 = <5>; -+ }; -+ - gpio-keys { - compatible = "gpio-keys"; - pinctrl-0 = <&rear_button_pins>; diff --git a/target/linux/mvebu/patches-4.19/220-disable-untested-dsa-boards.patch b/target/linux/mvebu/patches-4.19/220-disable-untested-dsa-boards.patch deleted file mode 100644 index 9cc7a113f6..0000000000 --- a/target/linux/mvebu/patches-4.19/220-disable-untested-dsa-boards.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/arch/arm/boot/dts/armada-385-linksys.dtsi -+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi -@@ -171,6 +171,7 @@ - status = "okay"; - - switch@0 { -+ status = "disabled"; - compatible = "marvell,mv88e6085"; - #address-cells = <1>; - #size-cells = <0>; ---- a/arch/arm/boot/dts/armada-388-clearfog.dts -+++ b/arch/arm/boot/dts/armada-388-clearfog.dts -@@ -161,6 +161,7 @@ - status = "okay"; - - switch@4 { -+ status = "disabled"; - compatible = "marvell,mv88e6085"; - #address-cells = <1>; - #size-cells = <0>; ---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -@@ -413,6 +413,7 @@ - status = "okay"; - - switch@0 { -+ status = "disabled"; - compatible = "marvell,mv88e6085"; - #address-cells = <1>; - #size-cells = <0>; diff --git a/target/linux/mvebu/patches-5.4/003-add_switch_nodes.patch b/target/linux/mvebu/patches-5.4/003-add_switch_nodes.patch deleted file mode 100644 index e13973767f..0000000000 --- a/target/linux/mvebu/patches-5.4/003-add_switch_nodes.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -@@ -210,6 +210,16 @@ - compatible = "pwm-fan"; - pwms = <&gpio0 24 4000>; - }; -+ -+ mvsw61xx { -+ compatible = "marvell,88e6172"; -+ status = "okay"; -+ reg = <0x10>; -+ -+ mii-bus = <&mdio>; -+ cpu-port-0 = <5>; -+ cpu-port-1 = <6>; -+ }; - }; - - &pciec { ---- a/arch/arm/boot/dts/armada-385-linksys.dtsi -+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi -@@ -82,6 +82,18 @@ - linux,default-trigger = "disk-activity"; - }; - }; -+ -+ mvsw61xx { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ compatible = "marvell,88e6176"; -+ status = "okay"; -+ reg = <0x10>; -+ -+ mii-bus = <&mdio>; -+ cpu-port-0 = <5>; -+ cpu-port-1 = <6>; -+ }; - }; - - &ahci0 { diff --git a/target/linux/mvebu/patches-5.4/210-clearfog_switch_node.patch b/target/linux/mvebu/patches-5.4/210-clearfog_switch_node.patch deleted file mode 100644 index d0e32e19df..0000000000 --- a/target/linux/mvebu/patches-5.4/210-clearfog_switch_node.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/arch/arm/boot/dts/armada-388-clearfog.dts -+++ b/arch/arm/boot/dts/armada-388-clearfog.dts -@@ -30,6 +30,18 @@ - }; - }; - -+ mvsw61xx { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ compatible = "marvell,88e6176"; -+ status = "okay"; -+ reg = <0x4>; -+ is-indirect; -+ -+ mii-bus = <&mdio>; -+ cpu-port-0 = <5>; -+ }; -+ - gpio-keys { - compatible = "gpio-keys"; - pinctrl-0 = <&rear_button_pins>; diff --git a/target/linux/mvebu/patches-5.4/220-disable-untested-dsa-boards.patch b/target/linux/mvebu/patches-5.4/220-disable-untested-dsa-boards.patch deleted file mode 100644 index 029eb68e21..0000000000 --- a/target/linux/mvebu/patches-5.4/220-disable-untested-dsa-boards.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/arch/arm/boot/dts/armada-385-linksys.dtsi -+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi -@@ -171,6 +171,7 @@ - status = "okay"; - - switch@0 { -+ status = "disabled"; - compatible = "marvell,mv88e6085"; - #address-cells = <1>; - #size-cells = <0>; ---- a/arch/arm/boot/dts/armada-388-clearfog.dts -+++ b/arch/arm/boot/dts/armada-388-clearfog.dts -@@ -103,6 +103,7 @@ - status = "okay"; - - switch@4 { -+ status = "disabled"; - compatible = "marvell,mv88e6085"; - #address-cells = <1>; - #size-cells = <0>; ---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts -@@ -366,6 +366,7 @@ - status = "okay"; - - switch@0 { -+ status = "disabled"; - compatible = "marvell,mv88e6085"; - #address-cells = <1>; - #size-cells = <0>; From 6058035e374d979ed8b2b8c6e4b4e009305745f4 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sun, 19 Apr 2020 15:34:40 +0800 Subject: [PATCH 42/49] mvebu: remove swconfig symbols from kernel config Signed-off-by: DENG Qingfang --- target/linux/mvebu/config-4.19 | 2 -- target/linux/mvebu/config-5.4 | 2 -- 2 files changed, 4 deletions(-) diff --git a/target/linux/mvebu/config-4.19 b/target/linux/mvebu/config-4.19 index 24093fd386..bf07ec58fd 100644 --- a/target/linux/mvebu/config-4.19 +++ b/target/linux/mvebu/config-4.19 @@ -345,7 +345,6 @@ CONFIG_MVNETA=y CONFIG_MVNETA_BM=y CONFIG_MVNETA_BM_ENABLE=y CONFIG_MVPP2=y -CONFIG_MVSW61XX_PHY=y CONFIG_MV_XOR=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEON=y @@ -452,7 +451,6 @@ CONFIG_SPI_ORION=y CONFIG_SRAM=y CONFIG_SRAM_EXEC=y CONFIG_SRCU=y -CONFIG_SWCONFIG=y CONFIG_SWPHY=y CONFIG_SWP_EMULATE=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y diff --git a/target/linux/mvebu/config-5.4 b/target/linux/mvebu/config-5.4 index f2033ca6d4..ac3e73c7f0 100644 --- a/target/linux/mvebu/config-5.4 +++ b/target/linux/mvebu/config-5.4 @@ -348,7 +348,6 @@ CONFIG_MVNETA=y CONFIG_MVNETA_BM=y CONFIG_MVNETA_BM_ENABLE=y # CONFIG_MVPP2 is not set -CONFIG_MVSW61XX_PHY=y CONFIG_MV_XOR=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEON=y @@ -454,7 +453,6 @@ CONFIG_SPI_ORION=y CONFIG_SRAM=y CONFIG_SRAM_EXEC=y CONFIG_SRCU=y -CONFIG_SWCONFIG=y CONFIG_SWPHY=y CONFIG_SWP_EMULATE=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y From f799c65946e147258fbea2ea18fae82ad567f7dc Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sun, 19 Apr 2020 15:36:04 +0800 Subject: [PATCH 43/49] mvebu: update default config for DSA Update network/LED configuration for DSA driver. sysupgrade from images prior to this commit with config preserved will break the ethernet. Signed-off-by: DENG Qingfang --- .../mvebu/cortexa9/base-files/etc/board.d/01_leds | 6 +++--- .../mvebu/cortexa9/base-files/etc/board.d/02_network | 10 ++-------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds index a7762f0080..450bc1f32a 100755 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds @@ -16,19 +16,19 @@ linksys,caiman|\ linksys,cobra|\ linksys,rango|\ linksys,shelby) - ucidef_set_led_netdev "wan" "WAN" "pca963x:$boardname:white:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "pca963x:$boardname:white:wan" "wan" ucidef_set_led_usbport "usb1" "USB 1" "pca963x:$boardname:white:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "pca963x:$boardname:white:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:$boardname:white:usb3_2" "usb3-port1" ;; linksys,mamba) - ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "wan" ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2" ;; linksys,venom) - ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "wan" ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1" diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network index b10e1419b5..a2290ce532 100755 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network @@ -21,9 +21,7 @@ linksys,mamba|\ linksys,rango|\ linksys,shelby|\ linksys,venom) - ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2" - ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; marvell,a385-db-ap) ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2" @@ -36,11 +34,7 @@ solidrun,clearfog-pro-a1) # eth0 is standalone ethernet # eth1 is switch # eth2 is SFP - ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2" - - # switch port 5 is connected to eth1 - ucidef_add_switch "switch0" \ - "0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5u@eth1" "6:lan:6" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6" "eth0 eth2" ;; solidrun,clearfog-base-a1) # eth0 is standalone ethernet From 4149d2b91c43784ada37efe928c5f6b610c74259 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Thu, 30 Apr 2020 19:41:39 +0800 Subject: [PATCH 44/49] mvebu: use eth0 as DSA CPU port for Linksys WRT eth0 has HW MAC address while eth2 does not. Use eth0 instead so we don't have to set LAN MAC manually. Disable unused eth2, until multi CPU port is supported. Signed-off-by: DENG Qingfang --- .../241-linksys-use-eth0-as-cpu-port.patch | 27 +++++++++++++++++++ .../241-linksys-use-eth0-as-cpu-port.patch | 27 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 target/linux/mvebu/patches-4.19/241-linksys-use-eth0-as-cpu-port.patch create mode 100644 target/linux/mvebu/patches-5.4/241-linksys-use-eth0-as-cpu-port.patch diff --git a/target/linux/mvebu/patches-4.19/241-linksys-use-eth0-as-cpu-port.patch b/target/linux/mvebu/patches-4.19/241-linksys-use-eth0-as-cpu-port.patch new file mode 100644 index 0000000000..c440530fc3 --- /dev/null +++ b/target/linux/mvebu/patches-4.19/241-linksys-use-eth0-as-cpu-port.patch @@ -0,0 +1,27 @@ +diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi +index 827e82be2201..b6aecf4cc5eb 100644 +--- a/arch/arm/boot/dts/armada-385-linksys.dtsi ++++ b/arch/arm/boot/dts/armada-385-linksys.dtsi +@@ -109,7 +109,7 @@ + }; + + ð2 { +- status = "okay"; ++ status = "disabled"; + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; +@@ -191,10 +191,10 @@ + label = "wan"; + }; + +- port@5 { +- reg = <5>; ++ port@6 { ++ reg = <6>; + label = "cpu"; +- ethernet = <ð2>; ++ ethernet = <ð0>; + + fixed-link { + speed = <1000>; diff --git a/target/linux/mvebu/patches-5.4/241-linksys-use-eth0-as-cpu-port.patch b/target/linux/mvebu/patches-5.4/241-linksys-use-eth0-as-cpu-port.patch new file mode 100644 index 0000000000..c440530fc3 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/241-linksys-use-eth0-as-cpu-port.patch @@ -0,0 +1,27 @@ +diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi +index 827e82be2201..b6aecf4cc5eb 100644 +--- a/arch/arm/boot/dts/armada-385-linksys.dtsi ++++ b/arch/arm/boot/dts/armada-385-linksys.dtsi +@@ -109,7 +109,7 @@ + }; + + ð2 { +- status = "okay"; ++ status = "disabled"; + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; +@@ -191,10 +191,10 @@ + label = "wan"; + }; + +- port@5 { +- reg = <5>; ++ port@6 { ++ reg = <6>; + label = "cpu"; +- ethernet = <ð2>; ++ ethernet = <ð0>; + + fixed-link { + speed = <1000>; From 9b34ea4f62bb4c4ad16b791c24e905775f2a52fd Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sun, 19 Apr 2020 15:53:03 +0800 Subject: [PATCH 45/49] mvebu: use ucidef to set up MAC address Use ucidef to set up MAC address instead of preinit script Signed-off-by: DENG Qingfang --- .../base-files/etc/board.d/02_network | 115 ++++++++++++------ 1 file changed, 76 insertions(+), 39 deletions(-) diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network index a2290ce532..89ccedae3f 100755 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network @@ -4,49 +4,86 @@ # Copyright (C) 2016 LEDE-Project.org # +. /lib/functions.sh . /lib/functions/uci-defaults.sh +. /lib/functions/system.sh + +mvebu_setup_interfaces() +{ + local board="$1" + + case "$board" in + cznic,turris-omnia) + ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4" "eth2" + ;; + linksys,caiman|\ + linksys,cobra|\ + linksys,mamba|\ + linksys,rango|\ + linksys,shelby|\ + linksys,venom) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" + ;; + marvell,a385-db-ap) + ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2" + ;; + marvell,axp-gp) + ucidef_set_interface_lan "eth0 eth1 eth2 eth3" + ;; + solidrun,clearfog-a1|\ + solidrun,clearfog-pro-a1) + # eth0 is standalone ethernet + # eth1 is switch + # eth2 is SFP + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6" "eth0 eth2" + ;; + solidrun,clearfog-base-a1) + # eth0 is standalone ethernet + # eth1 is standalone ethernet + # eth2 is SFP + ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2" + ;; + *) + ucidef_set_interface_lan "eth0" + ;; + esac +} + +mvebu_setup_macs() +{ + local board="$1" + local lan_mac="" + local wan_mac="" + local label_mac="" + + case "$board" in + buffalo,ls421de) + lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr) + ;; + linksys,caiman|\ + linksys,cobra|\ + linksys,rango|\ + linksys,shelby|\ + linksys,venom) + label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) + wan_mac=$(macaddr_setbit_la $label_mac) + ;; + linksys,mamba) + label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) + lan_mac=$label_mac + wan_mac=$label_mac + ;; + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac +} board_config_update - board=$(board_name) - -case "$board" in -cznic,turris-omnia) - ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4" - ucidef_set_interface_wan "eth2" - ;; -linksys,caiman|\ -linksys,cobra|\ -linksys,mamba|\ -linksys,rango|\ -linksys,shelby|\ -linksys,venom) - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" - ;; -marvell,a385-db-ap) - ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2" - ;; -marvell,axp-gp) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3" - ;; -solidrun,clearfog-a1|\ -solidrun,clearfog-pro-a1) - # eth0 is standalone ethernet - # eth1 is switch - # eth2 is SFP - ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6" "eth0 eth2" - ;; -solidrun,clearfog-base-a1) - # eth0 is standalone ethernet - # eth1 is standalone ethernet - # eth2 is SFP - ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2" - ;; -*) - ucidef_set_interface_lan "eth0" - ;; -esac - +mvebu_setup_interfaces $board +mvebu_setup_macs $board board_config_flush exit 0 From be309bfd744525d2b52a61994238f1f0e3322a34 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sun, 19 Apr 2020 15:55:31 +0800 Subject: [PATCH 46/49] mvebu: drop 06_set_iface_mac preinit script MAC address is set in board.d script Interface swapping is not needed anymore as switching to DSA breaks previous configuration anyway Signed-off-by: DENG Qingfang --- .../base-files/lib/preinit/06_set_iface_mac | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 target/linux/mvebu/cortexa9/base-files/lib/preinit/06_set_iface_mac diff --git a/target/linux/mvebu/cortexa9/base-files/lib/preinit/06_set_iface_mac b/target/linux/mvebu/cortexa9/base-files/lib/preinit/06_set_iface_mac deleted file mode 100644 index 62ce2653a0..0000000000 --- a/target/linux/mvebu/cortexa9/base-files/lib/preinit/06_set_iface_mac +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 2014-2015 OpenWrt.org -# Copyright (C) 2016 LEDE-Project.org -# - -preinit_set_mac_address() { - local mac - - . /lib/functions.sh - - case $(board_name) in - buffalo,ls421de) - mac=$(mtd_get_mac_ascii u-boot-env eth1addr) - ip link set dev eth0 address $mac 2>/dev/null - ;; - linksys,caiman|linksys,cobra|linksys,rango|linksys,shelby|linksys,venom) - # rename interfaces back to the way they were with 4.4 - case "$(readlink /sys/class/net/eth0)" in - *f1070000*) - ip link set eth0 name tmp0 - ip link set eth1 name eth0 - ip link set tmp0 name eth1 - ;; - esac - - mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - mac_wan=$(macaddr_setbit_la "$mac") - ip link set dev eth0 address $mac 2>/dev/null - ip link set dev eth1 address $mac_wan 2>/dev/null - ;; - linksys,mamba) - mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - ip link set dev eth0 address $mac 2>/dev/null - ip link set dev eth1 address $mac 2>/dev/null - ;; - marvell,a385-db-ap|solidrun,clearfog*a1) - # rename interfaces back to the way they were with 4.4 - case "$(readlink /sys/class/net/eth0)" in - *f1070000*) - ip link set eth0 name tmp0 - ip link set eth1 name eth0 - ip link set eth2 name eth1 - ip link set tmp0 name eth2 - ;; - esac - ;; - esac -} - -boot_hook_add preinit_main preinit_set_mac_address From 24410595e91cf99f1c1e347ccff3a3504c221795 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sun, 19 Apr 2020 16:04:06 +0800 Subject: [PATCH 47/49] generic: backport mv88e6xxx port mirroring support Backport port mirroring support for mv88e6xxx Signed-off-by: DENG Qingfang --- ...xxx-Split-monitor-port-configuration.patch | 149 ++++++++++ ...e6xxx-Add-support-for-port-mirroring.patch | 266 ++++++++++++++++++ ...x-fix-broken-if-statement-because-of.patch | 30 ++ ...mv88e6xxx-Fix-masking-of-egress-port.patch | 34 +++ 4 files changed, 479 insertions(+) create mode 100644 target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch create mode 100644 target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch create mode 100644 target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch create mode 100644 target/linux/generic/backport-5.4/749-v5.5-net-dsa-mv88e6xxx-Fix-masking-of-egress-port.patch diff --git a/target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch b/target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch new file mode 100644 index 0000000000..73dbcbe352 --- /dev/null +++ b/target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch @@ -0,0 +1,149 @@ +From 5c74c54ce6fff719999ff48f128cf4150ee4ff59 Mon Sep 17 00:00:00 2001 +From: Iwan R Timmer +Date: Thu, 7 Nov 2019 22:11:13 +0100 +Subject: [PATCH] net: dsa: mv88e6xxx: Split monitor port configuration + +Separate the configuration of the egress and ingress monitor port. +This allows the port mirror functionality to do ingress and egress +port mirroring to separate ports. + +Signed-off-by: Iwan R Timmer +Reviewed-by: Andrew Lunn +Signed-off-by: David S. Miller +--- + drivers/net/dsa/mv88e6xxx/chip.c | 9 ++++++- + drivers/net/dsa/mv88e6xxx/chip.h | 9 ++++++- + drivers/net/dsa/mv88e6xxx/global1.c | 42 ++++++++++++++++++++--------- + drivers/net/dsa/mv88e6xxx/global1.h | 8 ++++-- + 4 files changed, 52 insertions(+), 16 deletions(-) + +--- a/drivers/net/dsa/mv88e6xxx/chip.c ++++ b/drivers/net/dsa/mv88e6xxx/chip.c +@@ -2378,7 +2378,14 @@ static int mv88e6xxx_setup_upstream_port + + if (chip->info->ops->set_egress_port) { + err = chip->info->ops->set_egress_port(chip, +- upstream_port); ++ MV88E6XXX_EGRESS_DIR_INGRESS, ++ upstream_port); ++ if (err) ++ return err; ++ ++ err = chip->info->ops->set_egress_port(chip, ++ MV88E6XXX_EGRESS_DIR_EGRESS, ++ upstream_port); + if (err) + return err; + } +--- a/drivers/net/dsa/mv88e6xxx/chip.h ++++ b/drivers/net/dsa/mv88e6xxx/chip.h +@@ -33,6 +33,11 @@ enum mv88e6xxx_egress_mode { + MV88E6XXX_EGRESS_MODE_ETHERTYPE, + }; + ++enum mv88e6xxx_egress_direction { ++ MV88E6XXX_EGRESS_DIR_INGRESS, ++ MV88E6XXX_EGRESS_DIR_EGRESS, ++}; ++ + enum mv88e6xxx_frame_mode { + MV88E6XXX_FRAME_MODE_NORMAL, + MV88E6XXX_FRAME_MODE_DSA, +@@ -464,7 +469,9 @@ struct mv88e6xxx_ops { + int (*stats_get_stats)(struct mv88e6xxx_chip *chip, int port, + uint64_t *data); + int (*set_cpu_port)(struct mv88e6xxx_chip *chip, int port); +- int (*set_egress_port)(struct mv88e6xxx_chip *chip, int port); ++ int (*set_egress_port)(struct mv88e6xxx_chip *chip, ++ enum mv88e6xxx_egress_direction direction, ++ int port); + + #define MV88E6XXX_CASCADE_PORT_NONE 0xe + #define MV88E6XXX_CASCADE_PORT_MULTIPLE 0xf +--- a/drivers/net/dsa/mv88e6xxx/global1.c ++++ b/drivers/net/dsa/mv88e6xxx/global1.c +@@ -263,7 +263,9 @@ int mv88e6250_g1_ieee_pri_map(struct mv8 + /* Offset 0x1a: Monitor Control */ + /* Offset 0x1a: Monitor & MGMT Control on some devices */ + +-int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port) ++int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, ++ enum mv88e6xxx_egress_direction direction, ++ int port) + { + u16 reg; + int err; +@@ -272,11 +274,20 @@ int mv88e6095_g1_set_egress_port(struct + if (err) + return err; + +- reg &= ~(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK | +- MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK); +- +- reg |= port << __bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK) | +- port << __bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK); ++ switch (direction) { ++ case MV88E6XXX_EGRESS_DIR_INGRESS: ++ reg &= MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK; ++ reg |= port << ++ __bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK); ++ break; ++ case MV88E6XXX_EGRESS_DIR_EGRESS: ++ reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK; ++ reg |= port << ++ __bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK); ++ break; ++ default: ++ return -EINVAL; ++ } + + return mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg); + } +@@ -310,17 +321,24 @@ static int mv88e6390_g1_monitor_write(st + return mv88e6xxx_g1_write(chip, MV88E6390_G1_MONITOR_MGMT_CTL, reg); + } + +-int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port) ++int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, ++ enum mv88e6xxx_egress_direction direction, ++ int port) + { + u16 ptr; + int err; + +- ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_INGRESS_DEST; +- err = mv88e6390_g1_monitor_write(chip, ptr, port); +- if (err) +- return err; ++ switch (direction) { ++ case MV88E6XXX_EGRESS_DIR_INGRESS: ++ ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_INGRESS_DEST; ++ break; ++ case MV88E6XXX_EGRESS_DIR_EGRESS: ++ ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST; ++ break; ++ default: ++ return -EINVAL; ++ } + +- ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST; + err = mv88e6390_g1_monitor_write(chip, ptr, port); + if (err) + return err; +--- a/drivers/net/dsa/mv88e6xxx/global1.h ++++ b/drivers/net/dsa/mv88e6xxx/global1.h +@@ -288,8 +288,12 @@ int mv88e6095_g1_stats_set_histogram(str + int mv88e6390_g1_stats_set_histogram(struct mv88e6xxx_chip *chip); + void mv88e6xxx_g1_stats_read(struct mv88e6xxx_chip *chip, int stat, u32 *val); + int mv88e6xxx_g1_stats_clear(struct mv88e6xxx_chip *chip); +-int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port); +-int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port); ++int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, ++ enum mv88e6xxx_egress_direction direction, ++ int port); ++int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, ++ enum mv88e6xxx_egress_direction direction, ++ int port); + int mv88e6095_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port); + int mv88e6390_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port); + int mv88e6390_g1_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip); diff --git a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch new file mode 100644 index 0000000000..23c9bddf07 --- /dev/null +++ b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch @@ -0,0 +1,266 @@ +From f0942e00a1abb6404ca4302c66497fc623676c11 Mon Sep 17 00:00:00 2001 +From: Iwan R Timmer +Date: Thu, 7 Nov 2019 22:11:14 +0100 +Subject: [PATCH] net: dsa: mv88e6xxx: Add support for port mirroring + +Add support for configuring port mirroring through the cls_matchall +classifier. We do a full ingress and/or egress capture towards a +capture port. It allows setting a different capture port for ingress +and egress traffic. + +It keeps track of the mirrored ports and the destination ports to +prevent changes to the capture port while other ports are being +mirrored. + +Signed-off-by: Iwan R Timmer +Reviewed-by: Andrew Lunn +Signed-off-by: David S. Miller +--- + drivers/net/dsa/mv88e6xxx/chip.c | 76 +++++++++++++++++++++++++++++ + drivers/net/dsa/mv88e6xxx/chip.h | 6 +++ + drivers/net/dsa/mv88e6xxx/global1.c | 18 +++++-- + drivers/net/dsa/mv88e6xxx/port.c | 37 ++++++++++++++ + drivers/net/dsa/mv88e6xxx/port.h | 3 ++ + 5 files changed, 136 insertions(+), 4 deletions(-) + +--- a/drivers/net/dsa/mv88e6xxx/chip.c ++++ b/drivers/net/dsa/mv88e6xxx/chip.c +@@ -4921,6 +4921,80 @@ static int mv88e6xxx_port_mdb_del(struct + return err; + } + ++static int mv88e6xxx_port_mirror_add(struct dsa_switch *ds, int port, ++ struct dsa_mall_mirror_tc_entry *mirror, ++ bool ingress) ++{ ++ enum mv88e6xxx_egress_direction direction = ingress ? ++ MV88E6XXX_EGRESS_DIR_INGRESS : ++ MV88E6XXX_EGRESS_DIR_EGRESS; ++ struct mv88e6xxx_chip *chip = ds->priv; ++ bool other_mirrors = false; ++ int i; ++ int err; ++ ++ if (!chip->info->ops->set_egress_port) ++ return -EOPNOTSUPP; ++ ++ mutex_lock(&chip->reg_lock); ++ if ((ingress ? chip->ingress_dest_port : chip->egress_dest_port) != ++ mirror->to_local_port) { ++ for (i = 0; i < mv88e6xxx_num_ports(chip); i++) ++ other_mirrors |= ingress ? ++ chip->ports[i].mirror_ingress : ++ chip->ports[i].mirror_egress; ++ ++ /* Can't change egress port when other mirror is active */ ++ if (other_mirrors) { ++ err = -EBUSY; ++ goto out; ++ } ++ ++ err = chip->info->ops->set_egress_port(chip, ++ direction, ++ mirror->to_local_port); ++ if (err) ++ goto out; ++ } ++ ++ err = mv88e6xxx_port_set_mirror(chip, port, direction, true); ++out: ++ mutex_unlock(&chip->reg_lock); ++ ++ return err; ++} ++ ++static void mv88e6xxx_port_mirror_del(struct dsa_switch *ds, int port, ++ struct dsa_mall_mirror_tc_entry *mirror) ++{ ++ enum mv88e6xxx_egress_direction direction = mirror->ingress ? ++ MV88E6XXX_EGRESS_DIR_INGRESS : ++ MV88E6XXX_EGRESS_DIR_EGRESS; ++ struct mv88e6xxx_chip *chip = ds->priv; ++ bool other_mirrors = false; ++ int i; ++ ++ mutex_lock(&chip->reg_lock); ++ if (mv88e6xxx_port_set_mirror(chip, port, direction, false)) ++ dev_err(ds->dev, "p%d: failed to disable mirroring\n", port); ++ ++ for (i = 0; i < mv88e6xxx_num_ports(chip); i++) ++ other_mirrors |= mirror->ingress ? ++ chip->ports[i].mirror_ingress : ++ chip->ports[i].mirror_egress; ++ ++ /* Reset egress port when no other mirror is active */ ++ if (!other_mirrors) { ++ if (chip->info->ops->set_egress_port(chip, ++ direction, ++ dsa_upstream_port(ds, ++ port))); ++ dev_err(ds->dev, "failed to set egress port\n"); ++ } ++ ++ mutex_unlock(&chip->reg_lock); ++} ++ + static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port, + bool unicast, bool multicast) + { +@@ -4975,6 +5049,8 @@ static const struct dsa_switch_ops mv88e + .port_mdb_prepare = mv88e6xxx_port_mdb_prepare, + .port_mdb_add = mv88e6xxx_port_mdb_add, + .port_mdb_del = mv88e6xxx_port_mdb_del, ++ .port_mirror_add = mv88e6xxx_port_mirror_add, ++ .port_mirror_del = mv88e6xxx_port_mirror_del, + .crosschip_bridge_join = mv88e6xxx_crosschip_bridge_join, + .crosschip_bridge_leave = mv88e6xxx_crosschip_bridge_leave, + .port_hwtstamp_set = mv88e6xxx_port_hwtstamp_set, +--- a/drivers/net/dsa/mv88e6xxx/chip.h ++++ b/drivers/net/dsa/mv88e6xxx/chip.h +@@ -232,6 +232,8 @@ struct mv88e6xxx_port { + u64 vtu_member_violation; + u64 vtu_miss_violation; + u8 cmode; ++ bool mirror_ingress; ++ bool mirror_egress; + unsigned int serdes_irq; + }; + +@@ -315,6 +317,10 @@ struct mv88e6xxx_chip { + u16 evcap_config; + u16 enable_count; + ++ /* Current ingress and egress monitor ports */ ++ int egress_dest_port; ++ int ingress_dest_port; ++ + /* Per-port timestamping resources. */ + struct mv88e6xxx_port_hwtstamp port_hwtstamp[DSA_MAX_PORTS]; + +--- a/drivers/net/dsa/mv88e6xxx/global1.c ++++ b/drivers/net/dsa/mv88e6xxx/global1.c +@@ -267,6 +267,7 @@ int mv88e6095_g1_set_egress_port(struct + enum mv88e6xxx_egress_direction direction, + int port) + { ++ int *dest_port_chip; + u16 reg; + int err; + +@@ -276,11 +277,13 @@ int mv88e6095_g1_set_egress_port(struct + + switch (direction) { + case MV88E6XXX_EGRESS_DIR_INGRESS: ++ dest_port_chip = &chip->ingress_dest_port; + reg &= MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK; + reg |= port << + __bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK); + break; + case MV88E6XXX_EGRESS_DIR_EGRESS: ++ dest_port_chip = &chip->egress_dest_port; + reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK; + reg |= port << + __bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK); +@@ -289,7 +292,11 @@ int mv88e6095_g1_set_egress_port(struct + return -EINVAL; + } + +- return mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg); ++ err = mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg); ++ if (!err) ++ *dest_port_chip = port; ++ ++ return err; + } + + /* Older generations also call this the ARP destination. It has been +@@ -325,14 +332,17 @@ int mv88e6390_g1_set_egress_port(struct + enum mv88e6xxx_egress_direction direction, + int port) + { ++ int *dest_port_chip; + u16 ptr; + int err; + + switch (direction) { + case MV88E6XXX_EGRESS_DIR_INGRESS: ++ dest_port_chip = &chip->ingress_dest_port; + ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_INGRESS_DEST; + break; + case MV88E6XXX_EGRESS_DIR_EGRESS: ++ dest_port_chip = &chip->egress_dest_port; + ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST; + break; + default: +@@ -340,10 +350,10 @@ int mv88e6390_g1_set_egress_port(struct + } + + err = mv88e6390_g1_monitor_write(chip, ptr, port); +- if (err) +- return err; ++ if (!err) ++ *dest_port_chip = port; + +- return 0; ++ return err; + } + + int mv88e6390_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port) +--- a/drivers/net/dsa/mv88e6xxx/port.c ++++ b/drivers/net/dsa/mv88e6xxx/port.c +@@ -1181,6 +1181,43 @@ int mv88e6095_port_set_upstream_port(str + return mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL2, reg); + } + ++int mv88e6xxx_port_set_mirror(struct mv88e6xxx_chip *chip, int port, ++ enum mv88e6xxx_egress_direction direction, ++ bool mirror) ++{ ++ bool *mirror_port; ++ u16 reg; ++ u16 bit; ++ int err; ++ ++ err = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_CTL2, ®); ++ if (err) ++ return err; ++ ++ switch (direction) { ++ case MV88E6XXX_EGRESS_DIR_INGRESS: ++ bit = MV88E6XXX_PORT_CTL2_INGRESS_MONITOR; ++ mirror_port = &chip->ports[port].mirror_ingress; ++ break; ++ case MV88E6XXX_EGRESS_DIR_EGRESS: ++ bit = MV88E6XXX_PORT_CTL2_EGRESS_MONITOR; ++ mirror_port = &chip->ports[port].mirror_egress; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ reg &= ~bit; ++ if (mirror) ++ reg |= bit; ++ ++ err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL2, reg); ++ if (!err) ++ *mirror_port = mirror; ++ ++ return err; ++} ++ + int mv88e6xxx_port_set_8021q_mode(struct mv88e6xxx_chip *chip, int port, + u16 mode) + { +--- a/drivers/net/dsa/mv88e6xxx/port.h ++++ b/drivers/net/dsa/mv88e6xxx/port.h +@@ -368,6 +368,9 @@ int mv88e6352_port_link_state(struct mv8 + int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port); + int mv88e6095_port_set_upstream_port(struct mv88e6xxx_chip *chip, int port, + int upstream_port); ++int mv88e6xxx_port_set_mirror(struct mv88e6xxx_chip *chip, int port, ++ enum mv88e6xxx_egress_direction direction, ++ bool mirror); + + int mv88e6xxx_port_disable_learn_limit(struct mv88e6xxx_chip *chip, int port); + int mv88e6xxx_port_disable_pri_override(struct mv88e6xxx_chip *chip, int port); diff --git a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch new file mode 100644 index 0000000000..d9d5a5fd7c --- /dev/null +++ b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch @@ -0,0 +1,30 @@ +From 4e4637b10374ede3cd33d7e1b389e6cea6343ea3 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Tue, 12 Nov 2019 13:05:23 +0000 +Subject: [PATCH] net: dsa: mv88e6xxx: fix broken if statement because of a + stray semicolon + +There is a stray semicolon in an if statement that will cause a dev_err +message to be printed unconditionally. Fix this by removing the stray +semicolon. + +Addresses-Coverity: ("Stay semicolon") +Fixes: f0942e00a1ab ("net: dsa: mv88e6xxx: Add support for port mirroring") +Signed-off-by: Colin Ian King +Reviewed-by: Andrew Lunn +Signed-off-by: David S. Miller +--- + drivers/net/dsa/mv88e6xxx/chip.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/dsa/mv88e6xxx/chip.c ++++ b/drivers/net/dsa/mv88e6xxx/chip.c +@@ -4988,7 +4988,7 @@ static void mv88e6xxx_port_mirror_del(st + if (chip->info->ops->set_egress_port(chip, + direction, + dsa_upstream_port(ds, +- port))); ++ port))) + dev_err(ds->dev, "failed to set egress port\n"); + } + diff --git a/target/linux/generic/backport-5.4/749-v5.5-net-dsa-mv88e6xxx-Fix-masking-of-egress-port.patch b/target/linux/generic/backport-5.4/749-v5.5-net-dsa-mv88e6xxx-Fix-masking-of-egress-port.patch new file mode 100644 index 0000000000..50f655c0d2 --- /dev/null +++ b/target/linux/generic/backport-5.4/749-v5.5-net-dsa-mv88e6xxx-Fix-masking-of-egress-port.patch @@ -0,0 +1,34 @@ +From 3ee339eb28959629db33aaa2b8cde4c63c6289eb Mon Sep 17 00:00:00 2001 +From: Andrew Lunn +Date: Thu, 27 Feb 2020 21:20:49 +0100 +Subject: [PATCH] net: dsa: mv88e6xxx: Fix masking of egress port + +Add missing ~ to the usage of the mask. + +Reported-by: Kevin Benson +Reported-by: Chris Healy +Fixes: 5c74c54ce6ff ("net: dsa: mv88e6xxx: Split monitor port configuration") +Signed-off-by: Andrew Lunn +Signed-off-by: David S. Miller +--- + drivers/net/dsa/mv88e6xxx/global1.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/dsa/mv88e6xxx/global1.c ++++ b/drivers/net/dsa/mv88e6xxx/global1.c +@@ -278,13 +278,13 @@ int mv88e6095_g1_set_egress_port(struct + switch (direction) { + case MV88E6XXX_EGRESS_DIR_INGRESS: + dest_port_chip = &chip->ingress_dest_port; +- reg &= MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK; ++ reg &= ~MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK; + reg |= port << + __bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK); + break; + case MV88E6XXX_EGRESS_DIR_EGRESS: + dest_port_chip = &chip->egress_dest_port; +- reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK; ++ reg &= ~MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK; + reg |= port << + __bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK); + break; From 5a49cbf6c47be05186effb944a1bf5d845c36917 Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Sun, 19 Apr 2020 16:16:32 +0800 Subject: [PATCH 48/49] mvebu: remove swconfig package Signed-off-by: DENG Qingfang --- target/linux/mvebu/image/cortexa9.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 4ab6f4a7e8..4c7bbcd758 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -53,7 +53,7 @@ TARGET_DEVICES += globalscale_mirabox define Device/linksys $(Device/NAND-128K) DEVICE_VENDOR := Linksys - DEVICE_PACKAGES := kmod-mwlwifi swconfig wpad-basic + DEVICE_PACKAGES := kmod-mwlwifi wpad-basic IMAGES += factory.img KERNEL_SIZE := 6144k endef @@ -223,7 +223,7 @@ define Device/solidrun_clearfog-pro-a1 DEVICE_MODEL := ClearFog Pro KERNEL_INSTALL := 1 KERNEL := kernel-bin - DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils swconfig + DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base From 712e00877d69a6ec5a694c0773c764abab455b6c Mon Sep 17 00:00:00 2001 From: DENG Qingfang Date: Tue, 28 Apr 2020 23:40:53 +0800 Subject: [PATCH 49/49] mvebu: rename Linksys Mamba WAN port Rename it to wan to match Linksys Armada 385 series Signed-off-by: DENG Qingfang --- .../231-armada-xp-linksys-mamba-wan.patch | 13 +++++++++++++ .../231-armada-xp-linksys-mamba-wan.patch | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 target/linux/mvebu/patches-4.19/231-armada-xp-linksys-mamba-wan.patch create mode 100644 target/linux/mvebu/patches-5.4/231-armada-xp-linksys-mamba-wan.patch diff --git a/target/linux/mvebu/patches-4.19/231-armada-xp-linksys-mamba-wan.patch b/target/linux/mvebu/patches-4.19/231-armada-xp-linksys-mamba-wan.patch new file mode 100644 index 0000000000..40e852b089 --- /dev/null +++ b/target/linux/mvebu/patches-4.19/231-armada-xp-linksys-mamba-wan.patch @@ -0,0 +1,13 @@ +diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +index 8480a16919a0..8cf3c9d5205b 100644 +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -299,7 +299,7 @@ + + port@4 { + reg = <4>; +- label = "internet"; ++ label = "wan"; + }; + + port@5 { diff --git a/target/linux/mvebu/patches-5.4/231-armada-xp-linksys-mamba-wan.patch b/target/linux/mvebu/patches-5.4/231-armada-xp-linksys-mamba-wan.patch new file mode 100644 index 0000000000..40e852b089 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/231-armada-xp-linksys-mamba-wan.patch @@ -0,0 +1,13 @@ +diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +index 8480a16919a0..8cf3c9d5205b 100644 +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -299,7 +299,7 @@ + + port@4 { + reg = <4>; +- label = "internet"; ++ label = "wan"; + }; + + port@5 {