From 7bf7f78891647cefd340a3f91ecaa7b62705f3f0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 22 Oct 2021 22:09:16 +0200 Subject: [PATCH 01/11] layerscape: Fix build in dtb This fixes a kernel build problem. The removed parts of the patch are already applied upstream. Fixes: b4ed8a92751f ("kernel: bump 5.4 to 5.4.154") Signed-off-by: Hauke Mehrtens (cherry picked from commit 9501ce909f54b87dab95f17c0408a4962365e130) --- ...m64-dts-fsl-ls1028a-add-flexcan-node.patch | 27 ------------------- ...-0066-arm64-dts-ls1028a-add-gpu-node.patch | 2 +- ...64-dts-fsl-add-optee-node-for-ls1028.patch | 2 +- ...4-dts-ls1028a-Add-ftm_alarm0-DT-node.patch | 2 +- ...s1028a-Add-Felix-switch-port-DT-node.patch | 4 +-- ...28a-support-Felix-PF5-INTB-interrupt.patch | 4 +-- ...a-Add-ethernet-property-for-l2switch.patch | 4 +-- ...078-arm64-dts-fix-endianness-of-rcpm.patch | 2 +- ...a-Fix-interrupt-map-property-of-PCIe.patch | 4 +-- ...64-dts-ls1028a-fix-dwc-pci-over-smmu.patch | 4 +-- ...a-Update-the-clock-providers-for-the.patch | 2 +- ...28a-Update-clock-cells-of-dpclk-node.patch | 2 +- ...a-Add-properties-for-HD-Display-cont.patch | 2 +- ...s-fsl-Specify-phy-mode-for-CPU-ports.patch | 4 +-- ...op-compatible-string-from-Felix-swit.patch | 2 +- ...1028a-Specify-that-the-Felix-port-4-.patch | 2 +- ...1028a-Disable-eno3-and-make-swp5-the.patch | 8 +++--- ...-fsl-Add-clock-names-mclk0-for-SAI-n.patch | 6 ++--- ...cape-apply-dma-coherent-for-dwc3-nod.patch | 4 +-- ...a-Update-edma-compatible-to-fit-eDMA.patch | 2 +- ...-dts-ls1028a-Disable-swp5-by-default.patch | 4 +-- ...-fsl-ls1028a-prepare-dts-for-overlay.patch | 6 ++--- ...1028a-add-labels-to-Ethernet-switch-.patch | 2 +- 23 files changed, 37 insertions(+), 64 deletions(-) diff --git a/target/linux/layerscape/patches-5.4/302-dts-0058-arm64-dts-fsl-ls1028a-add-flexcan-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0058-arm64-dts-fsl-ls1028a-add-flexcan-node.patch index 28dd5675ea..8ca0801422 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0058-arm64-dts-fsl-ls1028a-add-flexcan-node.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0058-arm64-dts-fsl-ls1028a-add-flexcan-node.patch @@ -85,30 +85,3 @@ Signed-off-by: Pankaj Bansal * * Harninder Rai * -@@ -301,6 +301,26 @@ - reg = <0x0 0x2190000 0x0 0x10000>; - interrupts = ; - clocks = <&sysclk>, <&clockgen 4 1>; -+ clock-names = "ipg", "per"; -+ status = "disabled"; -+ }; -+ -+ can0: can@2180000 { -+ compatible = "fsl,ls1028ar1-flexcan", -+ "fsl,lx2160ar1-flexcan"; -+ reg = <0x0 0x2180000 0x0 0x10000>; -+ interrupts = ; -+ clocks = <&sysclk>, <&clockgen 4 1>; -+ clock-names = "ipg", "per"; -+ status = "disabled"; -+ }; -+ -+ can1: can@2190000 { -+ compatible = "fsl,ls1028ar1-flexcan", -+ "fsl,lx2160ar1-flexcan"; -+ reg = <0x0 0x2190000 0x0 0x10000>; -+ interrupts = ; -+ clocks = <&sysclk>, <&clockgen 4 1>; - clock-names = "ipg", "per"; - status = "disabled"; - }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0066-arm64-dts-ls1028a-add-gpu-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0066-arm64-dts-ls1028a-add-gpu-node.patch index 24db800a11..c429b7ca1e 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0066-arm64-dts-ls1028a-add-gpu-node.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0066-arm64-dts-ls1028a-add-gpu-node.patch @@ -12,7 +12,7 @@ Signed-off-by: Yuantian Tang --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -556,6 +556,16 @@ +@@ -536,6 +536,16 @@ clock-names = "wdog_clk", "apb_pclk"; }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0067-arm64-dts-fsl-add-optee-node-for-ls1028.patch b/target/linux/layerscape/patches-5.4/302-dts-0067-arm64-dts-fsl-add-optee-node-for-ls1028.patch index aa7bf3a34c..570a010bb0 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0067-arm64-dts-fsl-add-optee-node-for-ls1028.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0067-arm64-dts-fsl-add-optee-node-for-ls1028.patch @@ -13,7 +13,7 @@ Signed-off-by: Sahil Malhotra --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -789,6 +789,13 @@ +@@ -769,6 +769,13 @@ }; }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0069-arm64-dts-ls1028a-Add-ftm_alarm0-DT-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0069-arm64-dts-ls1028a-Add-ftm_alarm0-DT-node.patch index 38434cc8e7..b5193a5310 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0069-arm64-dts-ls1028a-Add-ftm_alarm0-DT-node.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0069-arm64-dts-ls1028a-Add-ftm_alarm0-DT-node.patch @@ -24,7 +24,7 @@ Signed-off-by: Biwen Li cpus { #address-cells = <1>; #size-cells = <0>; -@@ -787,6 +791,19 @@ +@@ -767,6 +771,19 @@ little-endian; }; }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch index 9d041feb14..3ed283edfd 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0074-arm64-dts-fsl-ls1028a-Add-Felix-switch-port-DT-node.patch @@ -22,7 +22,7 @@ Signed-off-by: Claudiu Manoil --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -768,7 +768,9 @@ +@@ -748,7 +748,9 @@ /* PF1: VF0-1 BAR0 - non-prefetchable memory */ 0x82000000 0x0 0x00000000 0x1 0xf8210000 0x0 0x020000 /* PF1: VF0-1 BAR2 - prefetchable memory */ @@ -33,7 +33,7 @@ Signed-off-by: Claudiu Manoil enetc_port0: ethernet@0,0 { compatible = "fsl,enetc"; -@@ -784,12 +786,66 @@ +@@ -764,12 +766,66 @@ #address-cells = <1>; #size-cells = <0>; }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0076-arm64-dts-ls1028a-support-Felix-PF5-INTB-interrupt.patch b/target/linux/layerscape/patches-5.4/302-dts-0076-arm64-dts-ls1028a-support-Felix-PF5-INTB-interrupt.patch index 338764d486..2fd0819014 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0076-arm64-dts-ls1028a-support-Felix-PF5-INTB-interrupt.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0076-arm64-dts-ls1028a-support-Felix-PF5-INTB-interrupt.patch @@ -15,7 +15,7 @@ Signed-off-by: Yangbo Lu --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -750,7 +750,6 @@ +@@ -730,7 +730,6 @@ reg = <0x01 0xf0000000 0x0 0x100000>; #address-cells = <3>; #size-cells = <2>; @@ -23,7 +23,7 @@ Signed-off-by: Yangbo Lu msi-parent = <&its>; device_type = "pci"; bus-range = <0x0 0x0>; -@@ -803,6 +802,8 @@ +@@ -783,6 +782,8 @@ switch@0,5 { compatible = "mscc,felix-switch"; reg = <0x000500 0 0 0 0>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0077-arm64-dts-ls1028a-Add-ethernet-property-for-l2switch.patch b/target/linux/layerscape/patches-5.4/302-dts-0077-arm64-dts-ls1028a-Add-ethernet-property-for-l2switch.patch index 0417cd7b61..9589af90ea 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0077-arm64-dts-ls1028a-Add-ethernet-property-for-l2switch.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0077-arm64-dts-ls1028a-Add-ethernet-property-for-l2switch.patch @@ -14,7 +14,7 @@ Signed-off-by: Claudiu Manoil --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -832,6 +832,7 @@ +@@ -812,6 +812,7 @@ }; port@5 { reg = <5>; @@ -22,7 +22,7 @@ Signed-off-by: Claudiu Manoil fixed-link { speed = <1000>; full-duplex; -@@ -839,7 +840,7 @@ +@@ -819,7 +820,7 @@ }; }; }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch b/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch index 23aabe8c27..0f57b17f3d 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch @@ -14,7 +14,7 @@ Signed-off-by: Biwen Li --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -854,6 +854,7 @@ +@@ -834,6 +834,7 @@ compatible = "fsl,ls1028a-rcpm", "fsl,qoriq-rcpm-2.1+"; reg = <0x0 0x1e34040 0x0 0x1c>; #fsl,rcpm-wakeup-cells = <7>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0079-arm64-dts-ls1028a-Fix-interrupt-map-property-of-PCIe.patch b/target/linux/layerscape/patches-5.4/302-dts-0079-arm64-dts-ls1028a-Fix-interrupt-map-property-of-PCIe.patch index 6114b3ecca..9f1fcc6a60 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0079-arm64-dts-ls1028a-Fix-interrupt-map-property-of-PCIe.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0079-arm64-dts-ls1028a-Fix-interrupt-map-property-of-PCIe.patch @@ -13,7 +13,7 @@ Signed-off-by: Hou Zhiqiang --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -713,10 +713,10 @@ +@@ -693,10 +693,10 @@ msi-parent = <&its>; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; @@ -28,7 +28,7 @@ Signed-off-by: Hou Zhiqiang status = "disabled"; }; -@@ -738,10 +738,10 @@ +@@ -718,10 +718,10 @@ msi-parent = <&its>; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0088-arm64-dts-ls1028a-fix-dwc-pci-over-smmu.patch b/target/linux/layerscape/patches-5.4/302-dts-0088-arm64-dts-ls1028a-fix-dwc-pci-over-smmu.patch index 205b46f7bd..82d6b4c043 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0088-arm64-dts-ls1028a-fix-dwc-pci-over-smmu.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0088-arm64-dts-ls1028a-fix-dwc-pci-over-smmu.patch @@ -16,7 +16,7 @@ Signed-off-by: Laurentiu Tudor --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -707,6 +707,7 @@ +@@ -687,6 +687,7 @@ #size-cells = <2>; device_type = "pci"; dma-coherent; @@ -24,7 +24,7 @@ Signed-off-by: Laurentiu Tudor bus-range = <0x0 0xff>; ranges = <0x81000000 0x0 0x00000000 0x80 0x00010000 0x0 0x00010000 /* downstream I/O */ 0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ -@@ -732,6 +733,7 @@ +@@ -712,6 +713,7 @@ #size-cells = <2>; device_type = "pci"; dma-coherent; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0089-arm64-dts-ls1028a-Update-the-clock-providers-for-the.patch b/target/linux/layerscape/patches-5.4/302-dts-0089-arm64-dts-ls1028a-Update-the-clock-providers-for-the.patch index bcb3d7b5f0..8c2d085665 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0089-arm64-dts-ls1028a-Update-the-clock-providers-for-the.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0089-arm64-dts-ls1028a-Update-the-clock-providers-for-the.patch @@ -43,7 +43,7 @@ Signed-off-by: Shawn Guo reboot { compatible ="syscon-reboot"; regmap = <&rst>; -@@ -880,7 +866,8 @@ +@@ -860,7 +846,8 @@ interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>, <0 223 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "DE", "SE"; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0090-arm64-dts-ls1028a-Update-clock-cells-of-dpclk-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0090-arm64-dts-ls1028a-Update-clock-cells-of-dpclk-node.patch index 62a506ae3d..b84ba01fb5 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0090-arm64-dts-ls1028a-Update-clock-cells-of-dpclk-node.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0090-arm64-dts-ls1028a-Update-clock-cells-of-dpclk-node.patch @@ -24,7 +24,7 @@ Signed-off-by: Shawn Guo clocks = <&osc_27m>; }; -@@ -866,7 +866,7 @@ +@@ -846,7 +846,7 @@ interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>, <0 223 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "DE", "SE"; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0091-arm64-dts-ls1028a-Add-properties-for-HD-Display-cont.patch b/target/linux/layerscape/patches-5.4/302-dts-0091-arm64-dts-ls1028a-Add-properties-for-HD-Display-cont.patch index f28eacbcf4..07620e57c9 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0091-arm64-dts-ls1028a-Add-properties-for-HD-Display-cont.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0091-arm64-dts-ls1028a-Add-properties-for-HD-Display-cont.patch @@ -17,7 +17,7 @@ Signed-off-by: Wen He --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -874,7 +874,23 @@ +@@ -854,7 +854,23 @@ port { dp0_out: endpoint { diff --git a/target/linux/layerscape/patches-5.4/302-dts-0093-arm64-dts-fsl-Specify-phy-mode-for-CPU-ports.patch b/target/linux/layerscape/patches-5.4/302-dts-0093-arm64-dts-fsl-Specify-phy-mode-for-CPU-ports.patch index 119a9b00c2..cf99f33251 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0093-arm64-dts-fsl-Specify-phy-mode-for-CPU-ports.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0093-arm64-dts-fsl-Specify-phy-mode-for-CPU-ports.patch @@ -15,7 +15,7 @@ Signed-off-by: Vladimir Oltean --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -813,6 +813,8 @@ +@@ -793,6 +793,8 @@ /* internal to-cpu ports */ port@4 { reg = <4>; @@ -24,7 +24,7 @@ Signed-off-by: Vladimir Oltean fixed-link { speed = <1000>; full-duplex; -@@ -821,6 +823,8 @@ +@@ -801,6 +803,8 @@ port@5 { reg = <5>; ethernet = <&enetc_port3>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0094-arm64-dts-fsl-Drop-compatible-string-from-Felix-swit.patch b/target/linux/layerscape/patches-5.4/302-dts-0094-arm64-dts-fsl-Drop-compatible-string-from-Felix-swit.patch index 5c75c52aed..ff9a05d3cc 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0094-arm64-dts-fsl-Drop-compatible-string-from-Felix-swit.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0094-arm64-dts-fsl-Drop-compatible-string-from-Felix-swit.patch @@ -14,7 +14,7 @@ Signed-off-by: Vladimir Oltean --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -788,7 +788,6 @@ +@@ -768,7 +768,6 @@ little-endian; }; switch@0,5 { diff --git a/target/linux/layerscape/patches-5.4/302-dts-0095-arm64-dts-fsl-ls1028a-Specify-that-the-Felix-port-4-.patch b/target/linux/layerscape/patches-5.4/302-dts-0095-arm64-dts-fsl-ls1028a-Specify-that-the-Felix-port-4-.patch index 5aa96470ad..195f28754d 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0095-arm64-dts-fsl-ls1028a-Specify-that-the-Felix-port-4-.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0095-arm64-dts-fsl-ls1028a-Specify-that-the-Felix-port-4-.patch @@ -22,7 +22,7 @@ Signed-off-by: Vladimir Oltean --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -815,7 +815,7 @@ +@@ -805,7 +805,7 @@ phy-mode = "gmii"; fixed-link { diff --git a/target/linux/layerscape/patches-5.4/302-dts-0096-arm64-dts-fsl-ls1028a-Disable-eno3-and-make-swp5-the.patch b/target/linux/layerscape/patches-5.4/302-dts-0096-arm64-dts-fsl-ls1028a-Disable-eno3-and-make-swp5-the.patch index af0933aca5..a1c50bcefb 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0096-arm64-dts-fsl-ls1028a-Disable-eno3-and-make-swp5-the.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0096-arm64-dts-fsl-ls1028a-Disable-eno3-and-make-swp5-the.patch @@ -27,7 +27,7 @@ Signed-off-by: Vladimir Oltean --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -773,7 +773,7 @@ +@@ -753,7 +753,7 @@ #address-cells = <1>; #size-cells = <0>; }; @@ -36,7 +36,7 @@ Signed-off-by: Vladimir Oltean compatible = "fsl,enetc"; reg = <0x000200 0 0 0 0>; fixed-link { -@@ -812,6 +812,7 @@ +@@ -792,6 +792,7 @@ /* internal to-cpu ports */ port@4 { reg = <4>; @@ -44,7 +44,7 @@ Signed-off-by: Vladimir Oltean phy-mode = "gmii"; fixed-link { -@@ -821,7 +822,6 @@ +@@ -801,7 +802,6 @@ }; port@5 { reg = <5>; @@ -52,7 +52,7 @@ Signed-off-by: Vladimir Oltean phy-mode = "gmii"; fixed-link { -@@ -834,6 +834,8 @@ +@@ -814,6 +814,8 @@ enetc_port3: ethernet@0,6 { compatible = "fsl,enetc"; reg = <0x000600 0 0 0 0>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0098-LF-403-ARM64-dts-fsl-Add-clock-names-mclk0-for-SAI-n.patch b/target/linux/layerscape/patches-5.4/302-dts-0098-LF-403-ARM64-dts-fsl-Add-clock-names-mclk0-for-SAI-n.patch index 0133ea009d..a6611b0b12 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0098-LF-403-ARM64-dts-fsl-Add-clock-names-mclk0-for-SAI-n.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0098-LF-403-ARM64-dts-fsl-Add-clock-names-mclk0-for-SAI-n.patch @@ -67,7 +67,7 @@ Signed-off-by: Alison Wang <&edma0 1 44>; --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -562,8 +562,9 @@ +@@ -542,8 +542,9 @@ reg = <0x0 0xf100000 0x0 0x10000>; interrupts = ; clocks = <&clockgen 4 1>, <&clockgen 4 1>, @@ -79,7 +79,7 @@ Signed-off-by: Alison Wang dma-names = "tx", "rx"; dmas = <&edma0 1 4>, <&edma0 1 3>; -@@ -576,8 +577,9 @@ +@@ -556,8 +557,9 @@ reg = <0x0 0xf110000 0x0 0x10000>; interrupts = ; clocks = <&clockgen 4 1>, <&clockgen 4 1>, @@ -91,7 +91,7 @@ Signed-off-by: Alison Wang dma-names = "tx", "rx"; dmas = <&edma0 1 6>, <&edma0 1 5>; -@@ -590,8 +592,9 @@ +@@ -570,8 +572,9 @@ reg = <0x0 0xf130000 0x0 0x10000>; interrupts = ; clocks = <&clockgen 4 1>, <&clockgen 4 1>, diff --git a/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch b/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch index 96003800f1..0db177972f 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch @@ -34,7 +34,7 @@ Signed-off-by: Ran Wang sata: sata@3200000 { --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -399,6 +399,7 @@ +@@ -379,6 +379,7 @@ snps,dis_rxdet_inp3_quirk; snps,quirk-frame-length-adjustment = <0x20>; snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; @@ -42,7 +42,7 @@ Signed-off-by: Ran Wang }; usb1: usb@3110000 { -@@ -409,6 +410,7 @@ +@@ -389,6 +390,7 @@ snps,dis_rxdet_inp3_quirk; snps,quirk-frame-length-adjustment = <0x20>; snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0103-arm64-dts-ls1028a-Update-edma-compatible-to-fit-eDMA.patch b/target/linux/layerscape/patches-5.4/302-dts-0103-arm64-dts-ls1028a-Update-edma-compatible-to-fit-eDMA.patch index 303b7d42f3..f2dccd7ac4 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0103-arm64-dts-ls1028a-Update-edma-compatible-to-fit-eDMA.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0103-arm64-dts-ls1028a-Update-edma-compatible-to-fit-eDMA.patch @@ -14,7 +14,7 @@ Signed-off-by: Peng Ma --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -345,7 +345,7 @@ +@@ -325,7 +325,7 @@ edma0: dma-controller@22c0000 { #dma-cells = <2>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0110-arm64-dts-ls1028a-Disable-swp5-by-default.patch b/target/linux/layerscape/patches-5.4/302-dts-0110-arm64-dts-ls1028a-Disable-swp5-by-default.patch index 098f760dcf..8c81a4560c 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0110-arm64-dts-ls1028a-Disable-swp5-by-default.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0110-arm64-dts-ls1028a-Disable-swp5-by-default.patch @@ -12,11 +12,11 @@ Signed-off-by: Vladimir Oltean --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -828,6 +828,7 @@ +@@ -808,6 +808,7 @@ port@5 { reg = <5>; phy-mode = "gmii"; + status = "disabled"; fixed-link { - speed = <1000>; + speed = <2500>; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch b/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch index 1db8c542ba..4b20e42794 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0112-arm64-dts-fsl-ls1028a-prepare-dts-for-overlay.patch @@ -385,7 +385,7 @@ Signed-off-by: Alex Marginean &sai4 { --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -792,30 +792,39 @@ +@@ -772,30 +772,39 @@ clocks = <&clockgen 2 3>; little-endian; }; @@ -432,7 +432,7 @@ Signed-off-by: Alex Marginean reg = <4>; ethernet = <&enetc_port2>; phy-mode = "gmii"; -@@ -825,7 +834,8 @@ +@@ -805,7 +814,8 @@ full-duplex; }; }; @@ -442,7 +442,7 @@ Signed-off-by: Alex Marginean reg = <5>; phy-mode = "gmii"; status = "disabled"; -@@ -837,6 +847,7 @@ +@@ -817,6 +827,7 @@ }; }; }; diff --git a/target/linux/layerscape/patches-5.4/302-dts-0114-arm64-dts-fsl-ls1028a-add-labels-to-Ethernet-switch-.patch b/target/linux/layerscape/patches-5.4/302-dts-0114-arm64-dts-fsl-ls1028a-add-labels-to-Ethernet-switch-.patch index 9faacc7228..e4d5449d08 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0114-arm64-dts-fsl-ls1028a-add-labels-to-Ethernet-switch-.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0114-arm64-dts-fsl-ls1028a-add-labels-to-Ethernet-switch-.patch @@ -13,7 +13,7 @@ Signed-off-by: Alex Marginean --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi -@@ -806,21 +806,25 @@ +@@ -786,21 +786,25 @@ mscc_felix_port0: port@0 { reg = <0>; status = "disabled"; From 24b23ed96a5570ce8ddd14f6f989f79d732acbae Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 22 Oct 2021 21:30:02 +0200 Subject: [PATCH 02/11] layerscape: Add missing config option This option is not set when building the target. In master this is also unset. Signed-off-by: Hauke Mehrtens --- target/linux/layerscape/armv8_64b/config-5.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4 index 1dbcc845ac..8e79321252 100644 --- a/target/linux/layerscape/armv8_64b/config-5.4 +++ b/target/linux/layerscape/armv8_64b/config-5.4 @@ -239,6 +239,7 @@ CONFIG_DMA_SHARED_BUFFER=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DNOTIFY=y CONFIG_DPAA2_CONSOLE=y +# CONFIG_DRM_CDNS_MHDP is not set CONFIG_DRM_RCAR_WRITEBACK=y CONFIG_DTC=y CONFIG_DT_IDLE_STATES=y From 5a02760c8f9c3b5ff2af8e6ba457b3a91d27d4e1 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Tue, 14 Sep 2021 12:06:31 -0300 Subject: [PATCH 03/11] wolfssl: fix build with GCC 10 on 32 x86 targets Backport upstream patch to fix build with GCC 10 on 32 x86 targets. Signed-off-by: Stijn Tintel (cherry picked from commit 718a4f47806da8f68cb8f1fe2ebecf403e14ae96) --- ...change-asm-snippets-to-get-compiling.patch | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch diff --git a/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch b/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch new file mode 100644 index 0000000000..091b241285 --- /dev/null +++ b/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch @@ -0,0 +1,123 @@ +From fa8f23284d4689c2a737204b337b58d966dcbd8c Mon Sep 17 00:00:00 2001 +From: Sean Parkinson +Date: Fri, 20 Aug 2021 10:23:38 +1000 +Subject: [PATCH] Maths x86 asm: change asm snippets to get compiling + +TFM: + Use register or memory for c0, c1, c2 in SQRADD and SQRADD2. +SP: + Use register or memory for vl, vh, vo in SP_ASM_MUL_ADD, +SP_ASM_MUL_ADD2 and SP_ASM_SQR_ADD. +--- + wolfcrypt/src/asm.c | 29 ++++++++++++++++++++--------- + wolfcrypt/src/sp_int.c | 6 +++--- + 2 files changed, 23 insertions(+), 12 deletions(-) + +diff --git a/wolfcrypt/src/asm.c b/wolfcrypt/src/asm.c +index b7f53d073..a37e75e02 100644 +--- a/wolfcrypt/src/asm.c ++++ b/wolfcrypt/src/asm.c +@@ -698,33 +698,39 @@ __asm__( \ + + #define SQRADD(i, j) \ + __asm__( \ +- "movl %6,%%eax \n\t" \ ++ "movl %3,%%eax \n\t" \ + "mull %%eax \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ +- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","cc"); ++ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \ ++ : "m"(i) \ ++ :"%eax","%edx","cc"); + + #define SQRADD2(i, j) \ + __asm__( \ +- "movl %6,%%eax \n\t" \ +- "mull %7 \n\t" \ ++ "movl %3,%%eax \n\t" \ ++ "mull %4 \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ +- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx", "cc"); ++ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \ ++ : "m"(i), "m"(j) \ ++ :"%eax","%edx", "cc"); + + #define SQRADDSC(i, j) \ +-__asm__( \ ++__asm__( \ + "movl %3,%%eax \n\t" \ + "mull %4 \n\t" \ + "movl %%eax,%0 \n\t" \ + "movl %%edx,%1 \n\t" \ + "xorl %2,%2 \n\t" \ +- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%eax","%edx","cc"); ++ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \ ++ : "g"(i), "g"(j) \ ++ :"%eax","%edx","cc"); + + #define SQRADDAC(i, j) \ + __asm__( \ +@@ -733,7 +739,9 @@ __asm__( \ + "addl %%eax,%0 \n\t" \ + "adcl %%edx,%1 \n\t" \ + "adcl $0,%2 \n\t" \ +- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc"); ++ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \ ++ : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \ ++ :"%eax","%edx","cc"); + + #define SQRADDDB \ + __asm__( \ +@@ -743,7 +751,10 @@ __asm__( \ + "addl %6,%0 \n\t" \ + "adcl %7,%1 \n\t" \ + "adcl %8,%2 \n\t" \ +- :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc"); ++ :"=r"(c0), "=r"(c1), "=r"(c2) \ ++ : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), \ ++ "r"(sc2) \ ++ : "cc"); + + #elif defined(TFM_X86_64) + /* x86-64 optimized */ +diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c +index 6070faaa9..d26702e47 100644 +--- a/wolfcrypt/src/sp_int.c ++++ b/wolfcrypt/src/sp_int.c +@@ -477,7 +477,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, + "addl %%eax, %[l] \n\t" \ + "adcl %%edx, %[h] \n\t" \ + "adcl $0 , %[o] \n\t" \ +- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \ ++ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \ + : [a] "r" (va), [b] "r" (vb) \ + : "eax", "edx", "cc" \ + ) +@@ -503,7 +503,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, + "addl %%eax, %[l] \n\t" \ + "adcl %%edx, %[h] \n\t" \ + "adcl $0 , %[o] \n\t" \ +- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \ ++ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \ + : [a] "r" (va), [b] "r" (vb) \ + : "eax", "edx", "cc" \ + ) +@@ -542,7 +542,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, + "addl %%eax, %[l] \n\t" \ + "adcl %%edx, %[h] \n\t" \ + "adcl $0 , %[o] \n\t" \ +- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \ ++ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \ + : [a] "m" (va) \ + : "eax", "edx", "cc" \ + ) +-- +2.31.1 + From 16414718f9ae57f294a8a9f70f766e0d170fae05 Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Tue, 14 Sep 2021 12:06:32 -0300 Subject: [PATCH 04/11] wolfssl: update to 4.8.1-stable Changes from 4.7.0: Fix one high (OCSP verification issue) and two low vulnerabilities Improve compatibility layer Other improvements and fixes For detailed changes refer to https://github.com/wolfSSL/wolfssl/releases Signed-off-by: Ivan Pavlov (cherry picked from commit 7d92bb0509615550b98e2dc71091073c8258d564) [Added patch to allow compilation with libtool 2.4] Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Makefile | 6 +++--- ...m-change-asm-snippets-to-get-compiling.patch | 17 +++++------------ .../patches/100-disable-hardening-check.patch | 2 +- .../patches/110-build-with-libtool-2.4.patch | 13 +++++++++++++ package/libs/wolfssl/patches/200-ecc-rng.patch | 4 ++-- 5 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 package/libs/wolfssl/patches/110-build-with-libtool-2.4.patch diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 41df3147d0..2881665753 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=4.7.0-stable -PKG_RELEASE:=3 +PKG_VERSION:=4.8.1-stable +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) -PKG_HASH:=b0e740b31d4d877d540ad50cc539a8873fc41af02bd3091c4357b403f7106e31 +PKG_HASH:=50db45f348f47e00c93dd244c24108220120cb3cc9d01434789229c32937c444 PKG_FIXUP:=libtool libtool-abiver PKG_INSTALL:=1 diff --git a/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch b/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch index 091b241285..763f9e8d06 100644 --- a/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch +++ b/package/libs/wolfssl/patches/001-Maths-x86-asm-change-asm-snippets-to-get-compiling.patch @@ -13,8 +13,6 @@ SP_ASM_MUL_ADD2 and SP_ASM_SQR_ADD. wolfcrypt/src/sp_int.c | 6 +++--- 2 files changed, 23 insertions(+), 12 deletions(-) -diff --git a/wolfcrypt/src/asm.c b/wolfcrypt/src/asm.c -index b7f53d073..a37e75e02 100644 --- a/wolfcrypt/src/asm.c +++ b/wolfcrypt/src/asm.c @@ -698,33 +698,39 @@ __asm__( \ @@ -64,7 +62,7 @@ index b7f53d073..a37e75e02 100644 #define SQRADDAC(i, j) \ __asm__( \ -@@ -733,7 +739,9 @@ __asm__( \ +@@ -733,7 +739,9 @@ __asm__( "addl %%eax,%0 \n\t" \ "adcl %%edx,%1 \n\t" \ "adcl $0,%2 \n\t" \ @@ -75,7 +73,7 @@ index b7f53d073..a37e75e02 100644 #define SQRADDDB \ __asm__( \ -@@ -743,7 +751,10 @@ __asm__( \ +@@ -743,7 +751,10 @@ __asm__( "addl %6,%0 \n\t" \ "adcl %7,%1 \n\t" \ "adcl %8,%2 \n\t" \ @@ -87,11 +85,9 @@ index b7f53d073..a37e75e02 100644 #elif defined(TFM_X86_64) /* x86-64 optimized */ -diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c -index 6070faaa9..d26702e47 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c -@@ -477,7 +477,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, +@@ -476,7 +476,7 @@ static WC_INLINE sp_int_digit sp_div_wor "addl %%eax, %[l] \n\t" \ "adcl %%edx, %[h] \n\t" \ "adcl $0 , %[o] \n\t" \ @@ -100,7 +96,7 @@ index 6070faaa9..d26702e47 100644 : [a] "r" (va), [b] "r" (vb) \ : "eax", "edx", "cc" \ ) -@@ -503,7 +503,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, +@@ -502,7 +502,7 @@ static WC_INLINE sp_int_digit sp_div_wor "addl %%eax, %[l] \n\t" \ "adcl %%edx, %[h] \n\t" \ "adcl $0 , %[o] \n\t" \ @@ -109,7 +105,7 @@ index 6070faaa9..d26702e47 100644 : [a] "r" (va), [b] "r" (vb) \ : "eax", "edx", "cc" \ ) -@@ -542,7 +542,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo, +@@ -541,7 +541,7 @@ static WC_INLINE sp_int_digit sp_div_wor "addl %%eax, %[l] \n\t" \ "adcl %%edx, %[h] \n\t" \ "adcl $0 , %[o] \n\t" \ @@ -118,6 +114,3 @@ index 6070faaa9..d26702e47 100644 : [a] "m" (va) \ : "eax", "edx", "cc" \ ) --- -2.31.1 - diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index c89ff1be9d..4141e28750 100644 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -1,6 +1,6 @@ --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h -@@ -2255,7 +2255,7 @@ extern void uITRON4_free(void *p) ; +@@ -2274,7 +2274,7 @@ extern void uITRON4_free(void *p) ; #endif /* warning for not using harden build options (default with ./configure) */ diff --git a/package/libs/wolfssl/patches/110-build-with-libtool-2.4.patch b/package/libs/wolfssl/patches/110-build-with-libtool-2.4.patch new file mode 100644 index 0000000000..206c6dac6a --- /dev/null +++ b/package/libs/wolfssl/patches/110-build-with-libtool-2.4.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 144c857e4..de7f6b45a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -32,7 +32,7 @@ AC_ARG_PROGRAM + + AC_CONFIG_HEADERS([config.h:config.in]) + +-LT_PREREQ([2.4.2]) ++LT_PREREQ([2.4]) + LT_INIT([disable-static win32-dll]) + + #shared library versioning diff --git a/package/libs/wolfssl/patches/200-ecc-rng.patch b/package/libs/wolfssl/patches/200-ecc-rng.patch index 2d33c06209..d8581be7eb 100644 --- a/package/libs/wolfssl/patches/200-ecc-rng.patch +++ b/package/libs/wolfssl/patches/200-ecc-rng.patch @@ -11,7 +11,7 @@ RNG regardless of the built settings for wolfssl. --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c -@@ -10293,21 +10293,21 @@ void wc_ecc_fp_free(void) +@@ -10938,21 +10938,21 @@ void wc_ecc_fp_free(void) #endif /* FP_ECC */ @@ -37,7 +37,7 @@ RNG regardless of the built settings for wolfssl. --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h -@@ -584,10 +584,8 @@ WOLFSSL_API +@@ -616,10 +616,8 @@ WOLFSSL_API void wc_ecc_fp_free(void); WOLFSSL_LOCAL void wc_ecc_fp_init(void); From 23cd9fafa89a8058a88763cc0526a1e85a9f7ebb Mon Sep 17 00:00:00 2001 From: Roger Pueyo Centelles Date: Tue, 31 Aug 2021 16:45:17 +0200 Subject: [PATCH 05/11] ath79: mikrotik: use 64 KiB SPI NOR erase sectors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes CONFIG_MTD_SPI_NOR_USE_4K_SECTORS from the default symbols for the ath79/mikrotik target. MikroTik devices hold some of their user-configurable settings in the soft_config partition, which is typically sized 4 KiB, of the SPI NOR flash memory. Previously, in the ar71xx target, it was possible to use 64 KiB erase sectors but also smaller 4 KiB ones when needed. This is no longer the case in ath79 with newer kernels so, to be able to write to these 4 KiB small partitions without erasing 60 KiB around, the CONFIG_MTD_SPI_NOR_USE_4K_SECTORS symbol was added to the defaults. However, this ended up making sysupgrade images which were built with 64 KiB size blocks not to keep settings (e.g., the files under /etc/config/) over the flashing process. Using 4 KiB erase sector size on the sysupgrade images (by setting BLOCKSIZE = 4k) allows keeping settings over a flashing process, but renders the process terribly slow, possibly causing a user to mistakenly force a manual device reboot while the process is still on- going. Instead, ditching the 4 KiB erase sectors for the default 64 KiB erase size provides normal SPI write speed and sysupgrade times, at the expense of not being able to modify the soft_config partition (which is rarely a required thing). An OpenWrt patch for MTD_SPI_NOR_USE_4K_SECTORS_LIMIT may once have allowed to use different per-partition erase sector sizes. Due to changes on recent kernels it now only works on a per-device basis. Also, partial eraseblock write can be performed in ath79 with kernels 5.4 and lower, by copying the blocks from the 64 KiB, erasing the whole sector and restoring those blocks not meant to be modified. A kernel bump had that patch broken for a long time, but got fixed in bf2870c. Note: the settings in the soft_config partition can be reset to their defaults by holding the reset button for 5 seconds (and less than 10 seconds) at device boot. Fixes: FS#3492 (sysupgrade […] loses settings...) Fixes: a66eee63368e (ath79: add mikrotik subtarget) Signed-off-by: Roger Pueyo Centelles (cherry picked from commit 68d91f08edd0efd47841a2e53d3437d570a61612) --- target/linux/ath79/mikrotik/config-default | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/ath79/mikrotik/config-default b/target/linux/ath79/mikrotik/config-default index 97dddfb197..5839b332ec 100644 --- a/target/linux/ath79/mikrotik/config-default +++ b/target/linux/ath79/mikrotik/config-default @@ -19,7 +19,6 @@ CONFIG_MTD_NAND_RB91X=y CONFIG_MTD_RAW_NAND=y CONFIG_MTD_ROUTERBOOT_PARTS=y CONFIG_MTD_SPI_NAND=y -CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPLIT_MINOR_FW=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BLOCK=y From 249478ec48509ba42827867fd15372478f9f42d2 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 2 Oct 2021 10:50:49 +0200 Subject: [PATCH 06/11] wolfssl: always build with --enable-reproducible-build This gates out anything that might introduce semantically frivolous jitter, maximizing chance of identical object files. The binary size shrinks by 8kb: 1244352 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f 1236160 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f Signed-off-by: Andre Heider (cherry picked from commit c76300707e8d705d9efc7ed4bb1b7449d0a5fe00) --- package/libs/wolfssl/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 2881665753..937828c9a0 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -69,6 +69,7 @@ TARGET_LDFLAGS += -flto # --enable-stunnel needed for OpenSSL API compatibility bits CONFIGURE_ARGS += \ + --enable-reproducible-build \ --enable-lighty \ --enable-opensslall \ --enable-opensslextra \ From 3f8adcb215edaa22448bdbf7cb12de9d95316671 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 2 Oct 2021 10:40:00 +0200 Subject: [PATCH 07/11] wolfssl: remove --enable-sha512 configure switch It's the default anyway and this just looks confusing, as if it wasn't. Switch to AUTORELEASE while at it. The binary size is unchanged. Signed-off-by: Andre Heider (cherry picked from commit 7cb5af30f48d6788cd471138820a772610a7f8e0) --- 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 937828c9a0..47501306c8 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.8.1-stable -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) @@ -102,7 +102,7 @@ endif ifeq ($(CONFIG_WOLFSSL_HAS_WPAS),y) CONFIGURE_ARGS += \ - --enable-wpas --enable-sha512 --enable-fortress --enable-fastmath + --enable-wpas --enable-fortress --enable-fastmath endif define Build/InstallDev From 23778f067a5aa8d2fa7e15244521774bf849ae6b Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Fri, 15 Oct 2021 08:11:10 +0300 Subject: [PATCH 08/11] wolfssl: fix compile when enable-devcrypto is set fixing linking error when --enable-devcrypto=yes fixes: 7d92bb050961 wolfssl: update to 4.8.1-stable Signed-off-by: Ivan Pavlov (cherry picked from commit be3e260f92643a841f4f83b03cbb07b9a26cff66) --- ...macro-guard-on-SHA256-transform-call.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch diff --git a/package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch b/package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch new file mode 100644 index 0000000000..f986b72798 --- /dev/null +++ b/package/libs/wolfssl/patches/002-Update-macro-guard-on-SHA256-transform-call.patch @@ -0,0 +1,22 @@ +From f447e4c1fa4c932c0286fa0331966756e243db81 Mon Sep 17 00:00:00 2001 +From: JacobBarthelmeh +Date: Fri, 17 Sep 2021 15:06:13 -0700 +Subject: [PATCH] update macro guard on SHA256 transform call + +--- + src/ssl.c | 3 ++- + tests/api.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/src/ssl.c ++++ b/src/ssl.c +@@ -17639,7 +17639,8 @@ size_t wolfSSL_get_client_random(const W + + #if defined(OPENSSL_EXTRA) + #if !defined(HAVE_SELFTEST) && (!defined(HAVE_FIPS) || \ +- (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))) ++ (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))) && \ ++ !defined(WOLFSSL_DEVCRYPTO_HASH) && !defined(WOLFSSL_AFALG_HASH) + /* Apply SHA256 transformation to the data */ + int wolfSSL_SHA256_Transform(WOLFSSL_SHA256_CTX* sha256, + const unsigned char* data) From 88151b8303f29f18e8b037076628fd82eda0978a Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 13 Aug 2021 23:28:44 +0200 Subject: [PATCH 09/11] ipq40xx: ar40xx: reset port status register This resolves incosnsitencies of the configured RX / TX flow control modes between different boards or bootloaders. Signed-off-by: David Bauer (cherry picked from commit 4d81f087715524994448ecaefd3ca87c8ba7e0a3) --- target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c index c35ba2799f..ca7f0ca350 100644 --- a/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c +++ b/target/linux/ipq40xx/files/drivers/net/phy/ar40xx.c @@ -1198,8 +1198,7 @@ ar40xx_init_port(struct ar40xx_priv *priv, int port) { u32 t; - ar40xx_rmw(priv, AR40XX_REG_PORT_STATUS(port), - AR40XX_PORT_AUTO_LINK_EN, 0); + ar40xx_write(priv, AR40XX_REG_PORT_STATUS(port), 0); ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0); From b4d7885af70a42df7577157b96f941500bd17bfb Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 25 Oct 2021 21:44:54 +0200 Subject: [PATCH 10/11] OpenWrt v21.02.1: adjust config defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 9 ++++----- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 + version.date | 1 + 5 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 version create mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index 98bf97232d..e1f2559e03 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,5 +1,4 @@ -src-git packages https://git.openwrt.org/feed/packages.git;openwrt-21.02 -src-git luci https://git.openwrt.org/project/luci.git;openwrt-21.02 -src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02 -src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02 -#src-link custom /usr/src/openwrt/custom-feed +src-git packages https://git.openwrt.org/feed/packages.git^ded142471e36831d2af63c7fe5062c4367f8ccd2 +src-git luci https://git.openwrt.org/project/luci.git^d24760e60a83b63f316c7b186e30636b5baa5481 +src-git routing https://git.openwrt.org/feed/routing.git^9e7698f20d1edf8f912fbce2f21400f3cc772b31 +src-git telephony https://git.openwrt.org/feed/telephony.git^ed2719867150a9bfc85bf41dff52ef8443820f2a diff --git a/include/version.mk b/include/version.mk index a4b47c8a57..ea5976d055 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02-SNAPSHOT) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.1) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16325-88151b8303) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02-SNAPSHOT) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.1) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 1f06332b00..cab0043676 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -183,7 +183,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/21.02-SNAPSHOT" + default "https://downloads.openwrt.org/releases/21.02.1" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -259,7 +259,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default y + default n help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version new file mode 100644 index 0000000000..1e075463f0 --- /dev/null +++ b/version @@ -0,0 +1 @@ +r16325-88151b8303 diff --git a/version.date b/version.date new file mode 100644 index 0000000000..61428985fb --- /dev/null +++ b/version.date @@ -0,0 +1 @@ +1635066095 From a77ea2f05f05b134ae52c55674efac5231018691 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 25 Oct 2021 21:45:09 +0200 Subject: [PATCH 11/11] OpenWrt v21.02.1: revert to branch defaults Signed-off-by: Hauke Mehrtens --- feeds.conf.default | 9 +++++---- include/version.mk | 6 +++--- package/base-files/image-config.in | 4 ++-- version | 1 - version.date | 1 - 5 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 version delete mode 100644 version.date diff --git a/feeds.conf.default b/feeds.conf.default index e1f2559e03..98bf97232d 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,4 +1,5 @@ -src-git packages https://git.openwrt.org/feed/packages.git^ded142471e36831d2af63c7fe5062c4367f8ccd2 -src-git luci https://git.openwrt.org/project/luci.git^d24760e60a83b63f316c7b186e30636b5baa5481 -src-git routing https://git.openwrt.org/feed/routing.git^9e7698f20d1edf8f912fbce2f21400f3cc772b31 -src-git telephony https://git.openwrt.org/feed/telephony.git^ed2719867150a9bfc85bf41dff52ef8443820f2a +src-git packages https://git.openwrt.org/feed/packages.git;openwrt-21.02 +src-git luci https://git.openwrt.org/project/luci.git;openwrt-21.02 +src-git routing https://git.openwrt.org/feed/routing.git;openwrt-21.02 +src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-21.02 +#src-link custom /usr/src/openwrt/custom-feed diff --git a/include/version.mk b/include/version.mk index ea5976d055..a4b47c8a57 100644 --- a/include/version.mk +++ b/include/version.mk @@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \ sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) -VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02.1) +VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),21.02-SNAPSHOT) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) -VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r16325-88151b8303) +VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) -VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02.1) +VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/21.02-SNAPSHOT) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index cab0043676..1f06332b00 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -183,7 +183,7 @@ if VERSIONOPT config VERSION_REPO string prompt "Release repository" - default "https://downloads.openwrt.org/releases/21.02.1" + default "https://downloads.openwrt.org/releases/21.02-SNAPSHOT" help This is the repository address embedded in the image, it defaults to the trunk snapshot repo; the url may contain the following placeholders: @@ -259,7 +259,7 @@ if VERSIONOPT config VERSION_CODE_FILENAMES bool prompt "Revision code in filenames" - default n + default y help Enable this to include the revision identifier or the configured version code into the firmware image, SDK- and Image Builder archive diff --git a/version b/version deleted file mode 100644 index 1e075463f0..0000000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -r16325-88151b8303 diff --git a/version.date b/version.date deleted file mode 100644 index 61428985fb..0000000000 --- a/version.date +++ /dev/null @@ -1 +0,0 @@ -1635066095