From 819db9dc2b61e8b32735e0b78b07193765cd9dc2 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 15 Jul 2021 22:40:00 +0800 Subject: [PATCH 1/9] scripts/download.pl: re-add aliyun mirrors Signed-off-by: Tianling Shen --- scripts/download.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/download.pl b/scripts/download.pl index 5b2e5ba670..019273cea3 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -205,6 +205,7 @@ foreach my $mirror (@ARGV) { push @mirrors, "https://mirror.netcologne.de/debian/$1"; } elsif ($mirror =~ /^\@APACHE\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/apache/$1"; + push @mirrors, "https://mirrors.aliyun.com/apache/$1"; # push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1"; # push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1"; push @mirrors, "https://mirror.netcologne.de/apache.org/$1"; @@ -229,6 +230,7 @@ foreach my $mirror (@ARGV) { } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/gnu/$1"; + push @mirrors, "https://mirrors.aliyun.com/gnu/$1"; # push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1"; # push @mirrors, "https://mirrors.cqu.edu.cn/gnu/$1"; # push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1"; From 63138ba4314dc12bbfd15b64e064505d51fcb0ed Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 16 Jul 2021 15:53:30 +0800 Subject: [PATCH 2/9] base-files: tweak default ntp servers Signed-off-by: Tianling Shen --- package/base-files/files/bin/config_generate | 8 ++++---- .../files/zzz-default-settings-chinese | 14 +++++++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 1b468413a1..fbdf2e968b 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -248,10 +248,10 @@ generate_static_system() { set system.ntp='timeserver' set system.ntp.enabled='1' set system.ntp.enable_server='0' - add_list system.ntp.server='ntp1.aliyun.com' - add_list system.ntp.server='time1.cloud.tencent.com' - add_list system.ntp.server='time.ustc.edu.cn' - add_list system.ntp.server='pool.ntp.org' + add_list system.ntp.server='time1.google.com' + add_list system.ntp.server='time1.apple.com' + add_list system.ntp.server='0.openwrt.pool.ntp.org' + add_list system.ntp.server='1.openwrt.pool.ntp.org' EOF if json_is_a system object; then diff --git a/package/emortal/default-settings/files/zzz-default-settings-chinese b/package/emortal/default-settings/files/zzz-default-settings-chinese index 0d9cb34bbf..4b9dbfe4aa 100755 --- a/package/emortal/default-settings/files/zzz-default-settings-chinese +++ b/package/emortal/default-settings/files/zzz-default-settings-chinese @@ -1,9 +1,17 @@ #!/bin/sh -uci set system.@system[0].timezone=CST-8 -uci set system.@system[0].zonename=Asia/Shanghai +uci -q batch <<-EOF + set system.@system[0].timezone='CST-8' + set system.@system[0].zonename='Asia/Shanghai' + + delete system.ntp.server + add_list system.ntp.server='cn.ntp.org.cn' + add_list system.ntp.server='ntp.ntsc.ac.cn' + add_list system.ntp.server='time1.cloud.tencent.com' + add_list system.ntp.server='time1.aliyun.com' +EOF uci commit system -sed -i 's#https://downloads.openwrt.org#https://mirrors.tencent.com/lede#g' /etc/opkg/distfeeds.conf +sed -i 's,downloads.openwrt.org,mirrors.tencent.com/lede,g' /etc/opkg/distfeeds.conf exit 0 From 1ac8417985252aae7baf5fce962710ae3a1d848c Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 17 Jul 2021 00:05:32 +0800 Subject: [PATCH 3/9] kernel: bump to 4.9.275, 4.14.239, 4.19.197 Refreshed all patches. Signed-off-by: Tianling Shen --- include/kernel-version.mk | 12 ++++++------ .../910-unaligned_access_hacks.patch | 2 +- .../950-add-boardinfo-platform-data.patch | 6 +++--- .../patches-4.9/910-unaligned_access_hacks.patch | 2 +- .../910-unaligned_access_hacks.patch | 2 +- .../910-unaligned_access_hacks.patch | 2 +- ...2835-Load-driver-early-and-support-lega.patch | 2 +- .../950-0039-Add-dwc_otg-driver.patch | 2 +- ...-0042-dmaengine-Add-support-for-BCM2708.patch | 4 ++-- ...evice-quirks-for-Freeway-Airmouse-T3-an.patch | 4 ++-- ...75-arch-arm-Add-model-string-to-cpuinfo.patch | 4 ++-- ...5.1-sch_cake-Make-the-dual-modes-fairer.patch | 12 ++++++------ ...mit-use-of-connmarks-as-tin-classifiers.patch | 4 ++-- ...Interpret-fwmark-parameter-as-a-bitmask.patch | 10 +++++----- ...e-drop-unused-variable-tin_quantum_prio.patch | 16 ++++++++-------- ...missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch | 2 +- .../090-net-generalize-napi_complete_done.patch | 2 +- .../generic/hack-4.14/207-disable-modorder.patch | 4 ++-- .../generic/hack-4.14/220-gc_sections.patch | 2 +- .../generic/hack-4.14/902-debloat_proc.patch | 2 +- .../generic/hack-4.19/204-module_strip.patch | 4 ++-- .../generic/hack-4.19/207-disable-modorder.patch | 4 ++-- .../generic/hack-4.19/220-gc_sections.patch | 2 +- .../generic/hack-4.19/221-module_exports.patch | 2 +- ...IP-protocol-handling-in-the-presence-of.patch | 2 +- .../generic/hack-4.19/902-debloat_proc.patch | 2 +- .../generic/hack-4.9/207-disable-modorder.patch | 4 ++-- .../710-phy-add-mdio_register_board_info.patch | 6 +++--- .../generic/hack-4.9/902-debloat_proc.patch | 2 +- .../pending-4.14/630-packet_socket_type.patch | 4 ++-- .../pending-4.19/630-packet_socket_type.patch | 4 ++-- .../pending-4.9/630-packet_socket_type.patch | 4 ++-- .../0002-dmaengine-Add-ADM-driver.patch | 2 +- .../0002-dmaengine-Add-ADM-driver.patch | 2 +- .../802-dma-support-layerscape.patch | 6 +++--- .../807-usb-support-layerscape.patch | 4 ++-- .../816-pcie-support-layerscape.patch | 6 +++--- ...iatek-Add-MediaTek-High-Speed-DMA-contr.patch | 2 +- .../patches-4.14/105-mt7621-memory-detect.patch | 2 +- .../700-net-mdiobus-add-unlocked-accessors.patch | 10 +++++----- 40 files changed, 85 insertions(+), 85 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index fc215f2ab4..f778cb2b2a 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,13 +6,13 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-4.9 = .272 -LINUX_VERSION-4.14 = .236 -LINUX_VERSION-4.19 = .194 +LINUX_VERSION-4.9 = .275 +LINUX_VERSION-4.14 = .239 +LINUX_VERSION-4.19 = .197 -LINUX_KERNEL_HASH-4.9.272 = f8bf0c390ae40ca736e104f10f744446bc534bf87ba1b6dbb2b7c9a8bece1058 -LINUX_KERNEL_HASH-4.14.236 = e4eae297a6fefefd8ce4781d98178a7c1ee51ca0a4c8a7e46e61b121fbab8b2a -LINUX_KERNEL_HASH-4.19.194 = aaaebdccf599f77148fe170642fa7dc2452cf994b5cbbb4d39cab9e7f4058896 +LINUX_KERNEL_HASH-4.9.275 = 6651728a295b13ca6266f2b6ed55065302a2117785e5a6f80bb64c587f3dbf22 +LINUX_KERNEL_HASH-4.14.239 = a0e7163e24675524d16b8077c055e4946bb16c0fe7cb0eaa20fbc7f846e5ff98 +LINUX_KERNEL_HASH-4.19.197 = e601259beb5184a189db3f8871c97fad9a3bdaceb9cc62e8cdc64f8505217282 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch index d651052112..921b98394c 100644 --- a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch @@ -325,7 +325,7 @@ for (p = *head; p; p = p->next) { --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look +@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look else if (skb) pkey = &ip_hdr(skb)->daddr; diff --git a/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch b/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch index edeac838d9..6b0d300023 100644 --- a/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch +++ b/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch @@ -26,7 +26,7 @@ #endif /* __MDIO_BOARD_INFO_H */ --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c -@@ -455,6 +455,17 @@ void mdiobus_free(struct mii_bus *bus) +@@ -456,6 +456,17 @@ void mdiobus_free(struct mii_bus *bus) } EXPORT_SYMBOL(mdiobus_free); @@ -44,7 +44,7 @@ /** * mdiobus_scan - scan a bus for MDIO devices. * @bus: mii_bus to scan -@@ -470,6 +481,7 @@ EXPORT_SYMBOL(mdiobus_free); +@@ -471,6 +482,7 @@ EXPORT_SYMBOL(mdiobus_free); struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) { struct phy_device *phydev; @@ -52,7 +52,7 @@ int err; phydev = get_phy_device(bus, addr, false); -@@ -482,6 +494,12 @@ struct phy_device *mdiobus_scan(struct m +@@ -483,6 +495,12 @@ struct phy_device *mdiobus_scan(struct m */ of_mdiobus_link_mdiodev(bus, &phydev->mdio); diff --git a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch index 5078446684..a90dec2a98 100644 --- a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch @@ -316,7 +316,7 @@ for (p = *head; p; p = p->next) { --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -460,7 +460,7 @@ static struct neighbour *ipv4_neigh_look +@@ -461,7 +461,7 @@ static struct neighbour *ipv4_neigh_look else if (skb) pkey = &ip_hdr(skb)->daddr; diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch index a82b6cc55b..c92cd10fc2 100644 --- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch @@ -316,7 +316,7 @@ for (p = *head; p; p = p->next) { --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look +@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look else if (skb) pkey = &ip_hdr(skb)->daddr; diff --git a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch index c9fb135e5f..f7a8be35e5 100644 --- a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch @@ -316,7 +316,7 @@ list_for_each_entry(p, head, list) { --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -450,7 +450,7 @@ static struct neighbour *ipv4_neigh_look +@@ -451,7 +451,7 @@ static struct neighbour *ipv4_neigh_look else if (skb) pkey = &ip_hdr(skb)->daddr; diff --git a/target/linux/bcm27xx/patches-4.19/950-0013-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch b/target/linux/bcm27xx/patches-4.19/950-0013-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch index 05bc4a0f4d..41b8124b0e 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0013-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0013-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch @@ -20,7 +20,7 @@ Signed-off-by: Noralf Trønnes --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -131,7 +131,7 @@ config COH901318 +@@ -132,7 +132,7 @@ config COH901318 config DMA_BCM2835 tristate "BCM2835 DMA engine support" diff --git a/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch index 092522a971..2d71dcd34e 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0039-Add-dwc_otg-driver.patch @@ -917,7 +917,7 @@ Fixes https://github.com/raspberrypi/linux/issues/2408 } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5247,7 +5247,7 @@ static void port_event(struct usb_hub *h +@@ -5249,7 +5249,7 @@ static void port_event(struct usb_hub *h u16 status = 0, unused; port_dev->over_current_count++; diff --git a/target/linux/bcm27xx/patches-4.19/950-0042-dmaengine-Add-support-for-BCM2708.patch b/target/linux/bcm27xx/patches-4.19/950-0042-dmaengine-Add-support-for-BCM2708.patch index 46bcb45e01..9ae3249fc3 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0042-dmaengine-Add-support-for-BCM2708.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0042-dmaengine-Add-support-for-BCM2708.patch @@ -178,7 +178,7 @@ Signed-off-by: Andrei Gherzan --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -131,7 +131,7 @@ config COH901318 +@@ -132,7 +132,7 @@ config COH901318 config DMA_BCM2835 tristate "BCM2835 DMA engine support" @@ -187,7 +187,7 @@ Signed-off-by: Andrei Gherzan select DMA_ENGINE select DMA_VIRTUAL_CHANNELS -@@ -576,6 +576,10 @@ config TIMB_DMA +@@ -577,6 +577,10 @@ config TIMB_DMA help Enable support for the Timberdale FPGA DMA engine. diff --git a/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index dfe21aa2f7..16a651ee3d 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0636-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1223,6 +1226,9 @@ +@@ -1224,6 +1227,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -186,6 +187,7 @@ static const struct hid_device_id hid_qu +@@ -187,6 +188,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, diff --git a/target/linux/bcm27xx/patches-4.19/950-0675-arch-arm-Add-model-string-to-cpuinfo.patch b/target/linux/bcm27xx/patches-4.19/950-0675-arch-arm-Add-model-string-to-cpuinfo.patch index cd33961de1..10efd2084e 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0675-arch-arm-Add-model-string-to-cpuinfo.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0675-arch-arm-Add-model-string-to-cpuinfo.patch @@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c -@@ -1238,6 +1238,8 @@ static int c_show(struct seq_file *m, vo +@@ -1240,6 +1240,8 @@ static int c_show(struct seq_file *m, vo { int i, j; u32 cpuid; @@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell for_each_online_cpu(i) { /* -@@ -1297,6 +1299,14 @@ static int c_show(struct seq_file *m, vo +@@ -1299,6 +1301,14 @@ static int c_show(struct seq_file *m, vo seq_printf(m, "Revision\t: %04x\n", system_rev); seq_printf(m, "Serial\t\t: %s\n", system_serial); diff --git a/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch b/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch index 0454565747..f560143248 100644 --- a/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch +++ b/target/linux/generic/backport-4.19/390-v5.1-sch_cake-Make-the-dual-modes-fairer.patch @@ -83,7 +83,7 @@ Signed-off-by: Kevin Darbyshire-Bryant q->flows[reduced_hash].dsthost = dsthost_idx; } } -@@ -1817,20 +1821,30 @@ static s32 cake_enqueue(struct sk_buff * +@@ -1821,20 +1825,30 @@ static s32 cake_enqueue(struct sk_buff * b->sparse_flow_count++; if (cake_dsrc(q->flow_mode)) @@ -116,7 +116,7 @@ Signed-off-by: Kevin Darbyshire-Bryant } if (q->buffer_used > q->buffer_max_used) -@@ -1998,23 +2012,8 @@ retry: +@@ -2002,23 +2016,8 @@ retry: dsthost = &b->hosts[flow->dsthost]; host_load = 1; @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant /* Keep all flows with deficits out of the sparse and decaying * rotations. No non-empty flow can go into the decaying * rotation, so they can't get deficits -@@ -2023,6 +2022,13 @@ retry: +@@ -2027,6 +2026,13 @@ retry: if (flow->head) { b->sparse_flow_count--; b->bulk_flow_count++; @@ -154,7 +154,7 @@ Signed-off-by: Kevin Darbyshire-Bryant flow->set = CAKE_SET_BULK; } else { /* we've moved it to the bulk rotation for -@@ -2032,6 +2038,22 @@ retry: +@@ -2036,6 +2042,22 @@ retry: flow->set = CAKE_SET_SPARSE_WAIT; } } @@ -177,7 +177,7 @@ Signed-off-by: Kevin Darbyshire-Bryant goto retry; } -@@ -2052,6 +2074,13 @@ retry: +@@ -2056,6 +2078,13 @@ retry: &b->decaying_flows); if (flow->set == CAKE_SET_BULK) { b->bulk_flow_count--; @@ -191,7 +191,7 @@ Signed-off-by: Kevin Darbyshire-Bryant b->decaying_flow_count++; } else if (flow->set == CAKE_SET_SPARSE || flow->set == CAKE_SET_SPARSE_WAIT) { -@@ -2065,14 +2094,19 @@ retry: +@@ -2069,14 +2098,19 @@ retry: if (flow->set == CAKE_SET_SPARSE || flow->set == CAKE_SET_SPARSE_WAIT) b->sparse_flow_count--; diff --git a/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch index 638a2b4529..f7a668714e 100644 --- a/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch +++ b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch @@ -91,7 +91,7 @@ Signed-off-by: David S. Miller }; /* COBALT operates the Codel and BLUE algorithms in parallel, in order to -@@ -2647,6 +2648,13 @@ static int cake_change(struct Qdisc *sch +@@ -2651,6 +2652,13 @@ static int cake_change(struct Qdisc *sch q->rate_flags &= ~CAKE_FLAG_SPLIT_GSO; } @@ -105,7 +105,7 @@ Signed-off-by: David S. Miller if (q->tins) { sch_tree_lock(sch); cake_reconfigure(sch); -@@ -2806,6 +2814,10 @@ static int cake_dump(struct Qdisc *sch, +@@ -2810,6 +2818,10 @@ static int cake_dump(struct Qdisc *sch, !!(q->rate_flags & CAKE_FLAG_SPLIT_GSO))) goto nla_put_failure; diff --git a/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch b/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch index 6ba0897b34..fa9563c7a5 100644 --- a/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch +++ b/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch @@ -52,7 +52,7 @@ Signed-off-by: Kevin Darbyshire-Bryant }; /* COBALT operates the Codel and BLUE algorithms in parallel, in order to -@@ -1573,7 +1575,7 @@ static struct cake_tin_data *cake_select +@@ -1577,7 +1579,7 @@ static struct cake_tin_data *cake_select struct sk_buff *skb) { struct cake_sched_data *q = qdisc_priv(sch); @@ -61,7 +61,7 @@ Signed-off-by: Kevin Darbyshire-Bryant bool wash; u8 dscp; -@@ -1584,6 +1586,7 @@ static struct cake_tin_data *cake_select +@@ -1588,6 +1590,7 @@ static struct cake_tin_data *cake_select wash = !!(q->rate_flags & CAKE_FLAG_WASH); if (wash) dscp = cake_handle_diffserv(skb, wash); @@ -69,7 +69,7 @@ Signed-off-by: Kevin Darbyshire-Bryant if (q->tin_mode == CAKE_DIFFSERV_BESTEFFORT) tin = 0; -@@ -2202,6 +2205,7 @@ static const struct nla_policy cake_poli +@@ -2206,6 +2209,7 @@ static const struct nla_policy cake_poli [TCA_CAKE_MPU] = { .type = NLA_U32 }, [TCA_CAKE_INGRESS] = { .type = NLA_U32 }, [TCA_CAKE_ACK_FILTER] = { .type = NLA_U32 }, @@ -77,7 +77,7 @@ Signed-off-by: Kevin Darbyshire-Bryant }; static void cake_set_rate(struct cake_tin_data *b, u64 rate, u32 mtu, -@@ -2649,10 +2653,8 @@ static int cake_change(struct Qdisc *sch +@@ -2653,10 +2657,8 @@ static int cake_change(struct Qdisc *sch } if (tb[TCA_CAKE_FWMARK]) { @@ -90,7 +90,7 @@ Signed-off-by: Kevin Darbyshire-Bryant } if (q->tins) { -@@ -2814,8 +2816,7 @@ static int cake_dump(struct Qdisc *sch, +@@ -2818,8 +2820,7 @@ static int cake_dump(struct Qdisc *sch, !!(q->rate_flags & CAKE_FLAG_SPLIT_GSO))) goto nla_put_failure; diff --git a/target/linux/generic/backport-4.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch b/target/linux/generic/backport-4.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch index 023844f5e6..516f751477 100644 --- a/target/linux/generic/backport-4.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch +++ b/target/linux/generic/backport-4.19/393-v5.5-sch_cake-drop-unused-variable-tin_quantum_prio.patch @@ -32,7 +32,7 @@ Signed-off-by: David S. Miller s32 tin_deficit; u32 tin_backlog; u32 tin_dropped; -@@ -1940,7 +1939,7 @@ begin: +@@ -1944,7 +1943,7 @@ begin: while (b->tin_deficit < 0 || !(b->sparse_flow_count + b->bulk_flow_count)) { if (b->tin_deficit <= 0) @@ -41,7 +41,7 @@ Signed-off-by: David S. Miller if (b->sparse_flow_count + b->bulk_flow_count) empty = false; -@@ -2261,8 +2260,7 @@ static int cake_config_besteffort(struct +@@ -2265,8 +2264,7 @@ static int cake_config_besteffort(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -51,7 +51,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2273,8 +2271,7 @@ static int cake_config_precedence(struct +@@ -2277,8 +2275,7 @@ static int cake_config_precedence(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -61,7 +61,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2287,18 +2284,14 @@ static int cake_config_precedence(struct +@@ -2291,18 +2288,14 @@ static int cake_config_precedence(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2367,8 +2360,7 @@ static int cake_config_diffserv8(struct +@@ -2371,8 +2364,7 @@ static int cake_config_diffserv8(struct struct cake_sched_data *q = qdisc_priv(sch); u32 mtu = psched_mtu(qdisc_dev(sch)); u64 rate = q->rate_bps; @@ -93,7 +93,7 @@ Signed-off-by: David S. Miller u32 i; q->tin_cnt = 8; -@@ -2384,18 +2376,14 @@ static int cake_config_diffserv8(struct +@@ -2388,18 +2380,14 @@ static int cake_config_diffserv8(struct cake_set_rate(b, rate, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -115,7 +115,7 @@ Signed-off-by: David S. Miller } return 0; -@@ -2434,17 +2422,11 @@ static int cake_config_diffserv4(struct +@@ -2438,17 +2426,11 @@ static int cake_config_diffserv4(struct cake_set_rate(&q->tins[3], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); @@ -137,7 +137,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -2475,15 +2457,10 @@ static int cake_config_diffserv3(struct +@@ -2479,15 +2461,10 @@ static int cake_config_diffserv3(struct cake_set_rate(&q->tins[2], rate >> 2, mtu, us_to_ns(q->target), us_to_ns(q->interval)); diff --git a/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch b/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch index bc063dccca..6925cc3c3b 100644 --- a/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch +++ b/target/linux/generic/backport-4.19/394-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch @@ -20,7 +20,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c -@@ -2204,6 +2204,7 @@ static const struct nla_policy cake_poli +@@ -2208,6 +2208,7 @@ static const struct nla_policy cake_poli [TCA_CAKE_MPU] = { .type = NLA_U32 }, [TCA_CAKE_INGRESS] = { .type = NLA_U32 }, [TCA_CAKE_ACK_FILTER] = { .type = NLA_U32 }, diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index b694c7e910..edf9af7be8 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -960,7 +960,7 @@ Signed-off-by: David S. Miller pasemi_mac_restart_tx_intr(mac); --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c -@@ -2386,7 +2386,7 @@ static int netxen_nic_poll(struct napi_s +@@ -2388,7 +2388,7 @@ static int netxen_nic_poll(struct napi_s work_done = budget; if (work_done < budget) { diff --git a/target/linux/generic/hack-4.14/207-disable-modorder.patch b/target/linux/generic/hack-4.14/207-disable-modorder.patch index 8ac07d2377..0cfb4d33ec 100644 --- a/target/linux/generic/hack-4.14/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.14/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1261,7 +1261,6 @@ endif +@@ -1260,7 +1260,6 @@ endif PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1290,7 +1289,6 @@ _modinst_: +@@ -1289,7 +1288,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.14/220-gc_sections.patch b/target/linux/generic/hack-4.14/220-gc_sections.patch index fc60001ce4..c91c25dab1 100644 --- a/target/linux/generic/hack-4.14/220-gc_sections.patch +++ b/target/linux/generic/hack-4.14/220-gc_sections.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -@@ -786,11 +791,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH +@@ -785,11 +790,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) endif diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch index b426b07573..8d02402498 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -393,7 +393,7 @@ Signed-off-by: Felix Fietkau --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -427,6 +427,9 @@ static struct pernet_operations ip_rt_pr +@@ -428,6 +428,9 @@ static struct pernet_operations ip_rt_pr static int __init ip_rt_proc_init(void) { diff --git a/target/linux/generic/hack-4.19/204-module_strip.patch b/target/linux/generic/hack-4.19/204-module_strip.patch index 056a9b44db..0f3c63677c 100644 --- a/target/linux/generic/hack-4.19/204-module_strip.patch +++ b/target/linux/generic/hack-4.19/204-module_strip.patch @@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau config MODULES_TREE_LOOKUP --- a/kernel/module.c +++ b/kernel/module.c -@@ -3090,9 +3090,11 @@ static int setup_load_info(struct load_i +@@ -3099,9 +3099,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3113,6 +3115,7 @@ static int check_modinfo(struct module * +@@ -3122,6 +3124,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/hack-4.19/207-disable-modorder.patch b/target/linux/generic/hack-4.19/207-disable-modorder.patch index 6b18407f41..0b8b35d9f2 100644 --- a/target/linux/generic/hack-4.19/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.19/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1257,7 +1257,6 @@ endif +@@ -1256,7 +1256,6 @@ endif PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1286,7 +1285,6 @@ _modinst_: +@@ -1285,7 +1284,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.19/220-gc_sections.patch b/target/linux/generic/hack-4.19/220-gc_sections.patch index 0bd84965fa..ef057ef5f7 100644 --- a/target/linux/generic/hack-4.19/220-gc_sections.patch +++ b/target/linux/generic/hack-4.19/220-gc_sections.patch @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -@@ -795,11 +800,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH +@@ -794,11 +799,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) endif diff --git a/target/linux/generic/hack-4.19/221-module_exports.patch b/target/linux/generic/hack-4.19/221-module_exports.patch index b8ecbc101e..005615351a 100644 --- a/target/linux/generic/hack-4.19/221-module_exports.patch +++ b/target/linux/generic/hack-4.19/221-module_exports.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau } \ \ /* __*init sections */ \ -@@ -863,6 +873,8 @@ +@@ -864,6 +874,8 @@ EXIT_TEXT \ EXIT_DATA \ EXIT_CALL \ diff --git a/target/linux/generic/hack-4.19/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch b/target/linux/generic/hack-4.19/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch index c962b71068..790434428c 100644 --- a/target/linux/generic/hack-4.19/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch +++ b/target/linux/generic/hack-4.19/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch @@ -103,7 +103,7 @@ Signed-off-by: Kevin Darbyshire-Bryant return false; if (!nf_ct_get_tuple_skb(&tuple, skb)) -@@ -1557,7 +1603,7 @@ static u8 cake_handle_diffserv(struct sk +@@ -1561,7 +1607,7 @@ static u8 cake_handle_diffserv(struct sk u16 *buf, buf_; u8 dscp; diff --git a/target/linux/generic/hack-4.19/902-debloat_proc.patch b/target/linux/generic/hack-4.19/902-debloat_proc.patch index 732948c3ca..0c37303d04 100644 --- a/target/linux/generic/hack-4.19/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch @@ -393,7 +393,7 @@ Signed-off-by: Felix Fietkau } --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -412,6 +412,9 @@ static struct pernet_operations ip_rt_pr +@@ -413,6 +413,9 @@ static struct pernet_operations ip_rt_pr static int __init ip_rt_proc_init(void) { diff --git a/target/linux/generic/hack-4.9/207-disable-modorder.patch b/target/linux/generic/hack-4.9/207-disable-modorder.patch index 680985a1d3..5d7dbf1f06 100644 --- a/target/linux/generic/hack-4.9/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.9/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1249,7 +1249,6 @@ endif +@@ -1248,7 +1248,6 @@ endif PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild -@@ -1279,7 +1278,6 @@ _modinst_: +@@ -1278,7 +1277,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch b/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch index a4c15fc36f..ec1fb74ed5 100644 --- a/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch +++ b/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch @@ -9,7 +9,7 @@ /** * mdiobus_alloc_size - allocate a mii_bus structure * @size: extra amount of memory to allocate for private storage. -@@ -400,6 +402,17 @@ void mdiobus_free(struct mii_bus *bus) +@@ -401,6 +403,17 @@ void mdiobus_free(struct mii_bus *bus) } EXPORT_SYMBOL(mdiobus_free); @@ -27,7 +27,7 @@ /** * mdiobus_scan - scan a bus for MDIO devices. * @bus: mii_bus to scan -@@ -415,6 +428,7 @@ EXPORT_SYMBOL(mdiobus_free); +@@ -416,6 +429,7 @@ EXPORT_SYMBOL(mdiobus_free); struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) { struct phy_device *phydev; @@ -35,7 +35,7 @@ int err; phydev = get_phy_device(bus, addr, false); -@@ -427,6 +441,12 @@ struct phy_device *mdiobus_scan(struct m +@@ -428,6 +442,12 @@ struct phy_device *mdiobus_scan(struct m */ of_mdiobus_link_mdiodev(bus, &phydev->mdio); diff --git a/target/linux/generic/hack-4.9/902-debloat_proc.patch b/target/linux/generic/hack-4.9/902-debloat_proc.patch index 0996b88fe6..834cdb0984 100644 --- a/target/linux/generic/hack-4.9/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.9/902-debloat_proc.patch @@ -394,7 +394,7 @@ Signed-off-by: Felix Fietkau --- a/net/ipv4/route.c +++ b/net/ipv4/route.c -@@ -422,6 +422,9 @@ static struct pernet_operations ip_rt_pr +@@ -423,6 +423,9 @@ static struct pernet_operations ip_rt_pr static int __init ip_rt_proc_init(void) { diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch index e9b40b18c6..fa02d3f706 100644 --- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3947,6 +3950,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3949,6 +3952,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3999,6 +4012,13 @@ static int packet_getsockopt(struct sock +@@ -4001,6 +4014,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.19/630-packet_socket_type.patch b/target/linux/generic/pending-4.19/630-packet_socket_type.patch index ea536b49a6..986565c04a 100644 --- a/target/linux/generic/pending-4.19/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.19/630-packet_socket_type.patch @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3909,6 +3912,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3911,6 +3914,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3961,6 +3974,13 @@ static int packet_getsockopt(struct sock +@@ -3963,6 +3976,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch index 158c6101c6..f7ed5f9a6a 100644 --- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3927,6 +3930,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3929,6 +3932,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3979,6 +3992,13 @@ static int packet_getsockopt(struct sock +@@ -3981,6 +3994,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch b/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch index fedb8ed798..aa7d2e791e 100644 --- a/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch +++ b/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch @@ -26,7 +26,7 @@ Signed-off-by: Thomas Pedersen --- a/drivers/dma/qcom/Kconfig +++ b/drivers/dma/qcom/Kconfig -@@ -27,3 +27,13 @@ config QCOM_HIDMA +@@ -28,3 +28,13 @@ config QCOM_HIDMA (user to kernel, kernel to kernel, etc.). It only supports memcpy interface. The core is not intended for general purpose slave DMA. diff --git a/target/linux/ipq806x/patches-4.19/0002-dmaengine-Add-ADM-driver.patch b/target/linux/ipq806x/patches-4.19/0002-dmaengine-Add-ADM-driver.patch index fedb8ed798..aa7d2e791e 100644 --- a/target/linux/ipq806x/patches-4.19/0002-dmaengine-Add-ADM-driver.patch +++ b/target/linux/ipq806x/patches-4.19/0002-dmaengine-Add-ADM-driver.patch @@ -26,7 +26,7 @@ Signed-off-by: Thomas Pedersen --- a/drivers/dma/qcom/Kconfig +++ b/drivers/dma/qcom/Kconfig -@@ -27,3 +27,13 @@ config QCOM_HIDMA +@@ -28,3 +28,13 @@ config QCOM_HIDMA (user to kernel, kernel to kernel, etc.). It only supports memcpy interface. The core is not intended for general purpose slave DMA. diff --git a/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch b/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch index 0b75847281..23f5ac4035 100644 --- a/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch @@ -47,7 +47,7 @@ Signed-off-by: Yuan Yao --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -129,6 +129,24 @@ config COH901318 +@@ -130,6 +130,24 @@ config COH901318 help Enable support for ST-Ericsson COH 901 318 DMA. @@ -72,7 +72,7 @@ Signed-off-by: Yuan Yao config DMA_BCM2835 tristate "BCM2835 DMA engine support" depends on ARCH_BCM2835 -@@ -215,6 +233,20 @@ config FSL_EDMA +@@ -216,6 +234,20 @@ config FSL_EDMA multiplexing capability for DMA request sources(slot). This module can be found on Freescale Vybrid and LS-1 SoCs. @@ -93,7 +93,7 @@ Signed-off-by: Yuan Yao config FSL_RAID tristate "Freescale RAID engine Support" depends on FSL_SOC && !ASYNC_TX_ENABLE_CHANNEL_SWITCH -@@ -600,7 +632,6 @@ config ZX_DMA +@@ -601,7 +633,6 @@ config ZX_DMA help Support the DMA engine for ZTE ZX family platform devices. diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch index 4ea197ed66..270cd93998 100644 --- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch @@ -508,7 +508,7 @@ Signed-off-by: Zhao Chenhui --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c -@@ -391,7 +391,7 @@ static int dwc3_ep0_handle_u1(struct dwc +@@ -394,7 +394,7 @@ static int dwc3_ep0_handle_u1(struct dwc return -EINVAL; reg = dwc3_readl(dwc->regs, DWC3_DCTL); @@ -517,7 +517,7 @@ Signed-off-by: Zhao Chenhui reg |= DWC3_DCTL_INITU1ENA; else reg &= ~DWC3_DCTL_INITU1ENA; -@@ -413,7 +413,7 @@ static int dwc3_ep0_handle_u2(struct dwc +@@ -416,7 +416,7 @@ static int dwc3_ep0_handle_u2(struct dwc return -EINVAL; reg = dwc3_readl(dwc->regs, DWC3_DCTL); diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch index e7c42d8d9b..38a308e9d4 100644 --- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch @@ -5604,9 +5604,9 @@ Signed-off-by: Yangbo Lu * them, we have to fall back to INTx or other interrupts, e.g., a --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c -@@ -3408,6 +3408,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_A - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset); - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset); +@@ -3430,6 +3430,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_A + */ + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0xb005, quirk_no_bus_reset); +/* + * NXP (Freescale Vendor ID) LS1088 chips do not behave correctly after diff --git a/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch b/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch index 6fd4cdef48..7398229502 100644 --- a/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch +++ b/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch @@ -29,7 +29,7 @@ Cc: Julia Lawall --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -604,6 +604,8 @@ config ZX_DMA +@@ -605,6 +605,8 @@ config ZX_DMA # driver files source "drivers/dma/bestcomm/Kconfig" diff --git a/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch b/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch index 2229612679..b19b57fd66 100644 --- a/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch +++ b/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch @@ -114,7 +114,7 @@ Signed-off-by: Chuanhong Guo --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c -@@ -91,6 +91,8 @@ void __init plat_mem_setup(void) +@@ -89,6 +89,8 @@ void __init plat_mem_setup(void) of_scan_flat_dt(early_init_dt_find_memory, NULL); if (memory_dtb) of_scan_flat_dt(early_init_dt_scan_memory, NULL); diff --git a/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch b/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch index 4880c49b13..c777a0fffe 100644 --- a/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch +++ b/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c -@@ -493,6 +493,55 @@ struct phy_device *mdiobus_scan(struct m +@@ -494,6 +494,55 @@ struct phy_device *mdiobus_scan(struct m EXPORT_SYMBOL(mdiobus_scan); /** @@ -75,7 +75,7 @@ Signed-off-by: David S. Miller * mdiobus_read_nested - Nested version of the mdiobus_read function * @bus: the mii_bus struct * @addr: the phy address -@@ -512,11 +561,9 @@ int mdiobus_read_nested(struct mii_bus * +@@ -513,11 +562,9 @@ int mdiobus_read_nested(struct mii_bus * BUG_ON(in_interrupt()); mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED); @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller return retval; } EXPORT_SYMBOL(mdiobus_read_nested); -@@ -538,11 +585,9 @@ int mdiobus_read(struct mii_bus *bus, in +@@ -539,11 +586,9 @@ int mdiobus_read(struct mii_bus *bus, in BUG_ON(in_interrupt()); mutex_lock(&bus->mdio_lock); @@ -101,7 +101,7 @@ Signed-off-by: David S. Miller return retval; } EXPORT_SYMBOL(mdiobus_read); -@@ -568,11 +613,9 @@ int mdiobus_write_nested(struct mii_bus +@@ -569,11 +614,9 @@ int mdiobus_write_nested(struct mii_bus BUG_ON(in_interrupt()); mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED); @@ -114,7 +114,7 @@ Signed-off-by: David S. Miller return err; } EXPORT_SYMBOL(mdiobus_write_nested); -@@ -595,11 +638,9 @@ int mdiobus_write(struct mii_bus *bus, i +@@ -596,11 +639,9 @@ int mdiobus_write(struct mii_bus *bus, i BUG_ON(in_interrupt()); mutex_lock(&bus->mdio_lock); From 9ffa52cf18d43dbf6ccf4155d8e3598dc97a11e4 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 18 Jul 2021 12:06:29 +0800 Subject: [PATCH 4/9] base-files: adjust default ntp server again --- package/base-files/files/bin/config_generate | 6 +++--- .../default-settings/files/zzz-default-settings-chinese | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index fbdf2e968b..f12ec9be5d 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -248,10 +248,10 @@ generate_static_system() { set system.ntp='timeserver' set system.ntp.enabled='1' set system.ntp.enable_server='0' - add_list system.ntp.server='time1.google.com' add_list system.ntp.server='time1.apple.com' - add_list system.ntp.server='0.openwrt.pool.ntp.org' - add_list system.ntp.server='1.openwrt.pool.ntp.org' + add_list system.ntp.server='time1.google.com' + add_list system.ntp.server='time.cloudflare.com' + add_list system.ntp.server='pool.ntp.org' EOF if json_is_a system object; then diff --git a/package/emortal/default-settings/files/zzz-default-settings-chinese b/package/emortal/default-settings/files/zzz-default-settings-chinese index 4b9dbfe4aa..30a9167bca 100755 --- a/package/emortal/default-settings/files/zzz-default-settings-chinese +++ b/package/emortal/default-settings/files/zzz-default-settings-chinese @@ -5,10 +5,10 @@ uci -q batch <<-EOF set system.@system[0].zonename='Asia/Shanghai' delete system.ntp.server - add_list system.ntp.server='cn.ntp.org.cn' - add_list system.ntp.server='ntp.ntsc.ac.cn' add_list system.ntp.server='time1.cloud.tencent.com' - add_list system.ntp.server='time1.aliyun.com' + add_list system.ntp.server='ntp1.aliyun.com' + add_list system.ntp.server='ntp.ntsc.ac.cn' + add_list system.ntp.server='cn.ntp.org.cn' EOF uci commit system From 2bb5878a50ad596e8958651f4b7e539dc13340a7 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Tue, 6 Jul 2021 01:21:46 +0200 Subject: [PATCH 5/9] toolchain: add gcc 11 version Add gcc 11 version. Same patches of gcc 10. Build tested on: ipq806x ipq807x Run tested on: ipq806x ipq807x Signed-off-by: Ansuel Smith [refresh patches] Signed-off-by: Hauke Mehrtens --- toolchain/gcc/Config.in | 3 + toolchain/gcc/Config.version | 5 + toolchain/gcc/common.mk | 4 + .../patches/11.1.0/002-case_insensitive.patch | 24 +++ .../patches/11.1.0/010-documentation.patch | 35 ++++ .../11.1.0/110-Fix-MIPS-PR-84790.patch | 20 +++ .../gcc/patches/11.1.0/230-musl_libssp.patch | 13 ++ .../300-mips_Os_cpu_rtx_cost_model.patch | 21 +++ .../11.1.0/810-arm-softfloat-libgcc.patch | 33 ++++ .../gcc/patches/11.1.0/820-libgcc_pic.patch | 44 +++++ .../840-armv4_pass_fix-v4bx_to_ld.patch | 28 +++ .../11.1.0/850-use_shared_libgcc.patch | 54 ++++++ .../patches/11.1.0/851-libgcc_no_compat.patch | 22 +++ .../patches/11.1.0/870-ppc_no_crtsavres.patch | 11 ++ .../patches/11.1.0/881-no_tm_section.patch | 11 ++ .../patches/11.1.0/900-bad-mips16-crt.patch | 9 + .../gcc/patches/11.1.0/910-mbsd_multi.patch | 146 +++++++++++++++ .../11.1.0/920-specs_nonfatal_getenv.patch | 22 +++ .../11.1.0/930-fix-mips-noexecstack.patch | 111 ++++++++++++ ...ibffi-fix-MIPS-softfloat-build-issue.patch | 168 ++++++++++++++++++ ...mpilation-when-making-cross-compiler.patch | 67 +++++++ 21 files changed, 851 insertions(+) create mode 100644 toolchain/gcc/patches/11.1.0/002-case_insensitive.patch create mode 100644 toolchain/gcc/patches/11.1.0/010-documentation.patch create mode 100644 toolchain/gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch create mode 100644 toolchain/gcc/patches/11.1.0/230-musl_libssp.patch create mode 100644 toolchain/gcc/patches/11.1.0/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 toolchain/gcc/patches/11.1.0/810-arm-softfloat-libgcc.patch create mode 100644 toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch create mode 100644 toolchain/gcc/patches/11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 toolchain/gcc/patches/11.1.0/850-use_shared_libgcc.patch create mode 100644 toolchain/gcc/patches/11.1.0/851-libgcc_no_compat.patch create mode 100644 toolchain/gcc/patches/11.1.0/870-ppc_no_crtsavres.patch create mode 100644 toolchain/gcc/patches/11.1.0/881-no_tm_section.patch create mode 100644 toolchain/gcc/patches/11.1.0/900-bad-mips16-crt.patch create mode 100644 toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch create mode 100644 toolchain/gcc/patches/11.1.0/920-specs_nonfatal_getenv.patch create mode 100644 toolchain/gcc/patches/11.1.0/930-fix-mips-noexecstack.patch create mode 100644 toolchain/gcc/patches/11.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch create mode 100644 toolchain/gcc/patches/11.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index f0fc31d567..5ac93217f8 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -18,6 +18,9 @@ choice config GCC_USE_VERSION_10 bool "gcc 10.x" + + config GCC_USE_VERSION_11 + bool "gcc 11.x" endchoice config GCC_USE_GRAPHITE diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 4e141477a5..e8cc3215be 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -10,11 +10,16 @@ config GCC_VERSION_10 default y if GCC_USE_VERSION_10 bool +config GCC_VERSION_11 + default y if GCC_USE_VERSION_11 + bool + config GCC_VERSION string default "7.5.0" if GCC_VERSION_7 default "9.3.0" if GCC_VERSION_9 default "10.3.0" if GCC_VERSION_10 + default "11.1.0" if GCC_VERSION_11 default "8.4.0" config GCC_USE_IREMAP diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index ef8fd9de47..36849de007 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -44,6 +44,10 @@ ifeq ($(PKG_VERSION),10.3.0) PKG_HASH:=64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344 endif +ifeq ($(PKG_VERSION),11.1.0) + PKG_HASH:=4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf +endif + PATCH_DIR=../patches/$(GCC_VERSION) BUGURL=http://bugs.openwrt.org/ diff --git a/toolchain/gcc/patches/11.1.0/002-case_insensitive.patch b/toolchain/gcc/patches/11.1.0/002-case_insensitive.patch new file mode 100644 index 0000000000..409497e5a3 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/002-case_insensitive.patch @@ -0,0 +1,24 @@ +commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e +Author: Felix Fietkau +Date: Sun Oct 19 21:45:51 2014 +0000 + + gcc: do not assume that the Mac OS X filesystem is case insensitive + + Signed-off-by: Felix Fietkau + + SVN-Revision: 42973 + +--- a/include/filenames.h ++++ b/include/filenames.h +@@ -44,11 +44,6 @@ extern "C" { + # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) + # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) + #else /* not DOSish */ +-# if defined(__APPLE__) +-# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM +-# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 +-# endif +-# endif /* __APPLE__ */ + # define HAS_DRIVE_SPEC(f) (0) + # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) + # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches/11.1.0/010-documentation.patch b/toolchain/gcc/patches/11.1.0/010-documentation.patch new file mode 100644 index 0000000000..885bd0301d --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/010-documentation.patch @@ -0,0 +1,35 @@ +commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 +Author: Luka Perkov +Date: Tue Feb 26 16:16:33 2013 +0000 + + gcc: don't build documentation + + This closes #13039. + + Signed-off-by: Luka Perkov + + SVN-Revision: 35807 + +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3355,18 +3355,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) + doc/gccint.info: $(TEXI_GCCINT_FILES) + doc/cppinternals.info: $(TEXI_CPPINT_FILES) + +-doc/%.info: %.texi +- if [ x$(BUILD_INFO) = xinfo ]; then \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ +- -I $(gcc_docdir)/include -o $@ $<; \ +- fi ++doc/%.info: + + # Duplicate entry to handle renaming of gccinstall.info +-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) +- if [ x$(BUILD_INFO) = xinfo ]; then \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ +- -I $(gcc_docdir)/include -o $@ $<; \ +- fi ++doc/gccinstall.info: + + doc/cpp.dvi: $(TEXI_CPP_FILES) + doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch new file mode 100644 index 0000000000..82ac013d30 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch @@ -0,0 +1,20 @@ +Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. +MIPS16 functions have a static assembler prologue which clobbers +registers v0 and v1. Add these register clobbers to function call +instructions. + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -3132,6 +3132,12 @@ mips_emit_call_insn (rtx pattern, rtx or + emit_insn (gen_update_got_version ()); + } + ++ if (TARGET_MIPS16 && TARGET_USE_GOT) ++ { ++ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); ++ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); ++ } ++ + if (TARGET_MIPS16 + && TARGET_EXPLICIT_RELOCS + && TARGET_CALL_CLOBBERED_GP) diff --git a/toolchain/gcc/patches/11.1.0/230-musl_libssp.patch b/toolchain/gcc/patches/11.1.0/230-musl_libssp.patch new file mode 100644 index 0000000000..66b88bc9e9 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/230-musl_libssp.patch @@ -0,0 +1,13 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -978,7 +978,9 @@ proper position among the other output f + #endif + + #ifndef LINK_SSP_SPEC +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if DEFAULT_LIBC == LIBC_MUSL ++#define LINK_SSP_SPEC "-lssp_nonshared" ++#elif defined(TARGET_LIBC_PROVIDES_SSP) + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit:}" + #else diff --git a/toolchain/gcc/patches/11.1.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/11.1.0/300-mips_Os_cpu_rtx_cost_model.patch new file mode 100644 index 0000000000..8c4a5fce19 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/300-mips_Os_cpu_rtx_cost_model.patch @@ -0,0 +1,21 @@ +commit ecf7671b769fe96f7b5134be442089f8bdba55d2 +Author: Felix Fietkau +Date: Thu Aug 4 20:29:45 2016 +0200 + +gcc: add a patch to generate better code with Os on mips + +Also happens to reduce compressed code size a bit + +Signed-off-by: Felix Fietkau + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -20041,7 +20041,7 @@ mips_option_override (void) + flag_pcc_struct_return = 0; + + /* Decide which rtx_costs structure to use. */ +- if (optimize_size) ++ if (0 && optimize_size) + mips_cost = &mips_rtx_cost_optimize_size; + else + mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain/gcc/patches/11.1.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/11.1.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..5c9d86aead --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,33 @@ +commit 8570c4be394cff7282f332f97da2ff569a927ddb +Author: Imre Kaloz +Date: Wed Feb 2 20:06:12 2011 +0000 + + fixup arm soft-float symbols + + SVN-Revision: 25325 + +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,10 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -58,8 +58,6 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" +- + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch b/toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch new file mode 100644 index 0000000000..525a95b565 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch @@ -0,0 +1,44 @@ +commit c96312958c0621e72c9b32da5bc224ffe2161384 +Author: Felix Fietkau +Date: Mon Oct 19 23:26:09 2009 +0000 + + gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) + + SVN-Revision: 18086 + +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -930,11 +930,12 @@ $(libgcov-driver-objects): %$(objext): $ + + # Static libraries. + libgcc.a: $(libgcc-objects) ++libgcc_pic.a: $(libgcc-s-objects) + libgcov.a: $(libgcov-objects) + libunwind.a: $(libunwind-objects) + libgcc_eh.a: $(libgcc-eh-objects) + +-libgcc.a libgcov.a libunwind.a libgcc_eh.a: ++libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: + -rm -f $@ + + objects="$(objects)"; \ +@@ -958,7 +959,7 @@ all: libunwind.a + endif + + ifeq ($(enable_shared),yes) +-all: libgcc_eh.a libgcc_s$(SHLIB_EXT) ++all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) + ifneq ($(LIBUNWIND),) + all: libunwind$(SHLIB_EXT) + libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) +@@ -1164,6 +1165,10 @@ install-shared: + chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a + $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a + ++ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ ++ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a ++ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a ++ + $(subst @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches/11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch new file mode 100644 index 0000000000..e3cb616c4e --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch @@ -0,0 +1,28 @@ +commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc +Author: Imre Kaloz +Date: Wed Feb 2 19:34:36 2011 +0000 + + add armv4 fixup patches + + SVN-Revision: 25322 + + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -91,10 +91,15 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" + ++/* For armv4 we pass --fix-v4bx to linker to support EABI */ ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ ++ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC EABI_LINK_SPEC \ ++#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + diff --git a/toolchain/gcc/patches/11.1.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/11.1.0/850-use_shared_libgcc.patch new file mode 100644 index 0000000000..8b17f1374f --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/850-use_shared_libgcc.patch @@ -0,0 +1,54 @@ +commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd +Author: Felix Fietkau +Date: Sun Feb 12 20:25:47 2012 +0000 + + gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary + + SVN-Revision: 30486 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -132,10 +132,6 @@ + "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) + +-/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we +- do not use -lfloat. */ +-#undef LIBGCC_SPEC +- + /* Clear the instruction cache from `beg' to `end'. This is + implemented in lib1funcs.S, so ensure an error if this definition + is used. */ +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTI + builtin_version ("CRuntime_Musl"); \ + } while (0) + ++#ifndef LIBGCC_SPEC ++#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" ++#endif ++ + /* Determine which dynamic linker to use depending on whether GLIBC or + uClibc or Bionic or musl is the default C library and whether + -muclibc or -mglibc or -mbionic or -mmusl has been passed to change +--- a/libgcc/mkmap-symver.awk ++++ b/libgcc/mkmap-symver.awk +@@ -136,5 +136,5 @@ function output(lib) { + else if (inherit[lib]) + printf("} %s;\n", inherit[lib]); + else +- printf ("\n local:\n\t*;\n};\n"); ++ printf ("\n\t*;\n};\n"); + } +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -62,6 +62,9 @@ + #undef CPP_OS_DEFAULT_SPEC + #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" + ++#undef LIBGCC_SPEC ++#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" ++ + #undef LINK_SHLIB_SPEC + #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ + %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/toolchain/gcc/patches/11.1.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/11.1.0/851-libgcc_no_compat.patch new file mode 100644 index 0000000000..d710e40717 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/851-libgcc_no_compat.patch @@ -0,0 +1,22 @@ +commit 64661de100da1ec1061ef3e5e400285dce115e6b +Author: Felix Fietkau +Date: Sun May 10 13:16:35 2015 +0000 + + gcc: add some size optimization patches + + Signed-off-by: Felix Fietkau + + SVN-Revision: 45664 + +--- a/libgcc/config/t-libunwind ++++ b/libgcc/config/t-libunwind +@@ -2,8 +2,7 @@ + + HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER + +-LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ +- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c ++LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + + # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches/11.1.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/11.1.0/870-ppc_no_crtsavres.patch new file mode 100644 index 0000000000..bc182f0cec --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/870-ppc_no_crtsavres.patch @@ -0,0 +1,11 @@ +--- a/gcc/config/rs6000/rs6000-logue.c ++++ b/gcc/config/rs6000/rs6000-logue.c +@@ -348,7 +348,7 @@ rs6000_savres_strategy (rs6000_stack_t * + /* Define cutoff for using out-of-line functions to save registers. */ + if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) + { +- if (!optimize_size) ++ if (1) + { + strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; + strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches/11.1.0/881-no_tm_section.patch b/toolchain/gcc/patches/11.1.0/881-no_tm_section.patch new file mode 100644 index 0000000000..2029910fd0 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/881-no_tm_section.patch @@ -0,0 +1,11 @@ +--- a/libgcc/crtstuff.c ++++ b/libgcc/crtstuff.c +@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ + #endif + + #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) +-# define USE_TM_CLONE_REGISTRY 1 ++# define USE_TM_CLONE_REGISTRY 0 + #elif !defined(USE_TM_CLONE_REGISTRY) + # define USE_TM_CLONE_REGISTRY 0 + #endif diff --git a/toolchain/gcc/patches/11.1.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/11.1.0/900-bad-mips16-crt.patch new file mode 100644 index 0000000000..dd6e9dc889 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/900-bad-mips16-crt.patch @@ -0,0 +1,9 @@ +--- a/libgcc/config/mips/t-mips16 ++++ b/libgcc/config/mips/t-mips16 +@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 + + # Version these symbols if building libgcc.so. + SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver ++ ++CRTSTUFF_T_CFLAGS += -mno-mips16 ++CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch b/toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch new file mode 100644 index 0000000000..b167436752 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch @@ -0,0 +1,146 @@ +commit 99368862e44740ff4fd33760893f04e14f9dbdf1 +Author: Felix Fietkau +Date: Tue Jul 31 00:52:27 2007 +0000 + + Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly + + SVN-Revision: 8256 + + This patch brings over a feature from MirBSD: + * -fhonour-copts + If this option is not given, it's warned (depending + on environment variables). This is to catch errors + of misbuilt packages which override CFLAGS themselves. + + This patch was authored by Thorsten Glaser + with copyright assignment to the FSF in effect. + +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags; + /* Whether any standard preincluded header has been preincluded. */ + static bool done_preinclude; + ++/* Check if a port honours COPTS. */ ++static int honour_copts = 0; ++ + static void handle_OPT_d (const char *); + static void set_std_cxx98 (int); + static void set_std_cxx11 (int); +@@ -469,6 +472,12 @@ c_common_handle_option (size_t scode, co + flag_no_builtin = !value; + break; + ++ case OPT_fhonour_copts: ++ if (c_language == clk_c) { ++ honour_copts++; ++ } ++ break; ++ + case OPT_fconstant_string_class_: + constant_string_class_name = arg; + break; +@@ -1196,6 +1205,47 @@ c_common_init (void) + return false; + } + ++ if (c_language == clk_c) { ++ char *ev = getenv ("GCC_HONOUR_COPTS"); ++ int evv; ++ if (ev == NULL) ++ evv = -1; ++ else if ((*ev == '0') || (*ev == '\0')) ++ evv = 0; ++ else if (*ev == '1') ++ evv = 1; ++ else if (*ev == '2') ++ evv = 2; ++ else if (*ev == 's') ++ evv = -1; ++ else { ++ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); ++ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ ++ } ++ if (evv == 1) { ++ if (honour_copts == 0) { ++ error ("someone does not honour COPTS at all in lenient mode"); ++ return false; ++ } else if (honour_copts != 1) { ++ warning (0, "someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ } ++ } else if (evv == 2) { ++ if (honour_copts == 0) { ++ error ("someone does not honour COPTS at all in strict mode"); ++ return false; ++ } else if (honour_copts != 1) { ++ error ("someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ return false; ++ } ++ } else if (evv == 0) { ++ if (honour_copts != 1) ++ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ } ++ } ++ + return true; + } + +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1663,6 +1663,9 @@ C++ ObjC++ Optimization Alias(fexception + fhonor-std + C++ ObjC++ WarnRemoved + ++fhonour-copts ++C ObjC C++ ObjC++ RejectNegative ++ + fhosted + C ObjC + Assume normal C execution environment. +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -1698,6 +1698,9 @@ fguess-branch-probability + Common Var(flag_guess_branch_prob) Optimization + Enable guessing of branch probabilities. + ++fhonour-copts ++Common RejectNegative ++ + ; Nonzero means ignore `#ident' directives. 0 means handle them. + ; Generate position-independent code for executables if possible + ; On SVR4 targets, it also controls whether or not to emit a +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -9054,6 +9054,17 @@ This option is only supported for C and + @option{-Wall} and by @option{-Wpedantic}, which can be disabled with + @option{-Wno-pointer-sign}. + ++@item -fhonour-copts ++@opindex fhonour-copts ++If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not ++given at least once, and warn if it is given more than once. ++If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not ++given exactly once. ++If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option ++is not given exactly once. ++The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. ++This flag and environment variable only affect the C language. ++ + @item -Wstack-protector + @opindex Wstack-protector + @opindex Wno-stack-protector +--- a/gcc/opts.c ++++ b/gcc/opts.c +@@ -2448,6 +2448,9 @@ common_handle_option (struct gcc_options + /* Currently handled in a prescan. */ + break; + ++ case OPT_fhonour_copts: ++ break; ++ + case OPT_Werror: + dc->warning_as_error_requested = value; + break; diff --git a/toolchain/gcc/patches/11.1.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/11.1.0/920-specs_nonfatal_getenv.patch new file mode 100644 index 0000000000..edbef09c6c --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/920-specs_nonfatal_getenv.patch @@ -0,0 +1,22 @@ +Author: Jo-Philipp Wich +Date: Sat Apr 21 03:02:39 2012 +0000 + + gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset + + SVN-Revision: 31390 + +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -10090,8 +10090,10 @@ getenv_spec_function (int argc, const ch + } + + if (!value) +- fatal_error (input_location, +- "environment variable %qs not defined", varname); ++ { ++ warning (input_location, "environment variable %qs not defined", varname); ++ value = ""; ++ } + + /* We have to escape every character of the environment variable so + they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches/11.1.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/11.1.0/930-fix-mips-noexecstack.patch new file mode 100644 index 0000000000..591dfe5a50 --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/930-fix-mips-noexecstack.patch @@ -0,0 +1,111 @@ +From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 +From: Andrew McDonnell +Date: Fri, 3 Oct 2014 19:09:00 +0930 +Subject: Add .note.GNU-stack section + +See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html +Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html + +Re: [Patch, MIPS] Add .note.GNU-stack section + + From: Steve Ellcey + +On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: +> +> +> On Wed, Sep 10, 2014 at 9:27 AM, wrote: + +> This works except you did not update the assembly files in +> libgcc or glibc. We (Cavium) have the same patch in our tree +> for a few released versions. + +> Mind just checking yours in then Andrew? + +> Thanks! +> -eric + +I talked to Andrew about what files he changed in GCC and created and +tested this new patch. Andrew also mentioned changing some assembly +files in glibc but I don't see any use of '.section .note.GNU-stack' in +any assembly files in glibc (for any platform) so I wasn't planning on +creating a glibc to add them to mips glibc assembly language files. + +OK to check in this patch? + +Steve Ellcey +sellcey@mips.com + + + +2014-09-26 Steve Ellcey +--- + gcc/config/mips/mips.c | 3 +++ + libgcc/config/mips/crti.S | 4 ++++ + libgcc/config/mips/crtn.S | 3 +++ + libgcc/config/mips/mips16.S | 4 ++++ + libgcc/config/mips/vr4120-div.S | 4 ++++ + 5 files changed, 18 insertions(+) + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -22890,6 +22890,9 @@ mips_asm_file_end (void) + #define TARGET_ASM_FILE_END mips_asm_file_end + + ++#undef TARGET_ASM_FILE_END ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-mips.h" +--- a/libgcc/config/mips/crti.S ++++ b/libgcc/config/mips/crti.S +@@ -24,6 +24,10 @@ see the files COPYING3 and COPYING.RUNTI + /* An executable stack is *not* required for these functions. */ + #include "gnustack.h" + ++ ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ + /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. + Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ + +--- a/libgcc/config/mips/crtn.S ++++ b/libgcc/config/mips/crtn.S +@@ -24,6 +24,9 @@ see the files COPYING3 and COPYING.RUNTI + /* An executable stack is *not* required for these functions. */ + #include "gnustack.h" + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ + /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. + Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ + +--- a/libgcc/config/mips/mips16.S ++++ b/libgcc/config/mips/mips16.S +@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI + values using the soft-float calling convention, but do the actual + operation using the hard floating point instructions. */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ .previous ++ + #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) + + /* This file contains 32-bit assembly code. */ +--- a/libgcc/config/mips/vr4120-div.S ++++ b/libgcc/config/mips/vr4120-div.S +@@ -29,6 +29,10 @@ see the files COPYING3 and COPYING.RUNTI + -mfix-vr4120. div and ddiv do not give the correct result when one + of the operands is negative. */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ .previous ++ + .set nomips16 + + #define DIV \ diff --git a/toolchain/gcc/patches/11.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/11.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch new file mode 100644 index 0000000000..fb4cb1533a --- /dev/null +++ b/toolchain/gcc/patches/11.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch @@ -0,0 +1,168 @@ +From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 +From: BangLang Huang +Date: Wed, 9 Nov 2016 10:36:49 +0800 +Subject: [PATCH] libffi: fix MIPS softfloat build issue + +Backported from github.com/libffi/libffi#272 + +Signed-off-by: BangLang Huang +Signed-off-by: Yousong Zhou +--- + libffi/src/mips/n32.S | 17 +++++++++++++++++ + libffi/src/mips/o32.S | 17 +++++++++++++++++ + 2 files changed, 34 insertions(+) + +--- a/libffi/src/mips/n32.S ++++ b/libffi/src/mips/n32.S +@@ -107,6 +107,16 @@ loadregs: + + REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. + ++#ifdef __mips_soft_float ++ REG_L a0, 0*FFI_SIZEOF_ARG(t9) ++ REG_L a1, 1*FFI_SIZEOF_ARG(t9) ++ REG_L a2, 2*FFI_SIZEOF_ARG(t9) ++ REG_L a3, 3*FFI_SIZEOF_ARG(t9) ++ REG_L a4, 4*FFI_SIZEOF_ARG(t9) ++ REG_L a5, 5*FFI_SIZEOF_ARG(t9) ++ REG_L a6, 6*FFI_SIZEOF_ARG(t9) ++ REG_L a7, 7*FFI_SIZEOF_ARG(t9) ++#else + and t4, t6, ((1< +Date: Fri, 4 May 2018 18:20:53 +0800 +Subject: [PATCH] gotools: fix compilation when making cross compiler + +libgo is "the runtime support library for the Go programming language. +This library is intended for use with the Go frontend." + +gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but +the linker will complain that it cannot find it. That's because shared libgcc +is not present in the install directory yet. libgo.so was made without problem +because gcc will emit -lgcc_s when compiled with -shared option. When gotools +were being made, it was supplied with -static-libgcc thus no link option was +provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec +for linking with libgo.so + +- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation +- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html + +When 3-pass GCC compilation is used, shared libgcc runtime libraries will be +available after gcc pass2 completed and will meet the gotools link requirement +at gcc pass3 +--- + gotools/Makefile.am | 4 +++- + gotools/Makefile.in | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/gotools/Makefile.am ++++ b/gotools/Makefile.am +@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} + STAMP = echo timestamp > + + libgodir = ../$(target_noncanonical)/libgo ++libgccdir = ../$(target_noncanonical)/libgcc + LIBGODEP = $(libgodir)/libgo.la + + LIBGOTOOL = $(libgodir)/libgotool.a +@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) + GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) + + AM_GOCFLAGS = -I $(libgodir) +-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs ++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ ++ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s + GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ + + libgosrcdir = $(srcdir)/../libgo/go +--- a/gotools/Makefile.in ++++ b/gotools/Makefile.in +@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd + PWD_COMMAND = $${PWDCMD-pwd} + STAMP = echo timestamp > + libgodir = ../$(target_noncanonical)/libgo ++libgccdir = ../$(target_noncanonical)/libgcc + LIBGODEP = $(libgodir)/libgo.la + LIBGOTOOL = $(libgodir)/libgotool.a + @NATIVE_FALSE@GOCOMPILER = $(GOC) +@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a + GOCFLAGS = $(CFLAGS_FOR_TARGET) + GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) + AM_GOCFLAGS = -I $(libgodir) +-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs ++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ ++ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s + GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ + libgosrcdir = $(srcdir)/../libgo/go + cmdsrcdir = $(libgosrcdir)/cmd From 5a6225d58703363682f484995bb53a9c9c4f4232 Mon Sep 17 00:00:00 2001 From: Edgar Su Date: Mon, 12 Jul 2021 21:22:48 +0800 Subject: [PATCH 6/9] x86: kernel: set NR_CPUS to 512 NR_CPUS limits the number of CPUs supported to 8. This makes total sense on hardware-restircted platforms, but not on x86_64, where CPUs with more than 8 cores can be easily acquired and with less physical limitaions. see also: https://forum.openwrt.org/t/x86-64-8-cpu-limitation-on-vanilla-release/100946 Signed-off-by: Edgar Su --- target/linux/x86/64/config-4.14 | 2 +- target/linux/x86/64/config-4.19 | 4 ++-- target/linux/x86/config-4.14 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/x86/64/config-4.14 b/target/linux/x86/64/config-4.14 index f8c109442a..8d3cd4e812 100644 --- a/target/linux/x86/64/config-4.14 +++ b/target/linux/x86/64/config-4.14 @@ -251,7 +251,7 @@ CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MPSC is not set CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NET_FLOW_LIMIT=y -CONFIG_NR_CPUS=8 +CONFIG_NR_CPUS=512 # CONFIG_NUMA is not set CONFIG_OUTPUT_FORMAT="elf64-x86-64" CONFIG_PADATA=y diff --git a/target/linux/x86/64/config-4.19 b/target/linux/x86/64/config-4.19 index 70e7e2f3a0..d838a54250 100644 --- a/target/linux/x86/64/config-4.19 +++ b/target/linux/x86/64/config-4.19 @@ -265,8 +265,8 @@ CONFIG_ND_CLAIM=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NET_FAILOVER=y CONFIG_NET_FLOW_LIMIT=y -CONFIG_NR_CPUS=8 -CONFIG_NR_CPUS_DEFAULT=64 +CONFIG_NR_CPUS=512 +CONFIG_NR_CPUS_DEFAULT=512 CONFIG_NR_CPUS_RANGE_BEGIN=2 CONFIG_NR_CPUS_RANGE_END=512 # CONFIG_NUMA is not set diff --git a/target/linux/x86/config-4.14 b/target/linux/x86/config-4.14 index 0b1acdc8d9..4237357e7d 100644 --- a/target/linux/x86/config-4.14 +++ b/target/linux/x86/config-4.14 @@ -344,7 +344,7 @@ CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NLS=y # CONFIG_NOHIGHMEM is not set CONFIG_NO_BOOTMEM=y -CONFIG_NR_CPUS=1 +CONFIG_NR_CPUS=8 # CONFIG_NSC_GPIO is not set CONFIG_NVRAM=y # CONFIG_OF is not set From c8e0a72956189fda5cdcc92f9ac35dcbc713911a Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 18 Jul 2021 15:32:44 +0200 Subject: [PATCH 7/9] dnsmasq: add /tmp/hosts/ to jail_mount Programs like the olsr-name-plugin write hostname files to "/tmp/hosts/". If you don't add this to the jail_mount, dnsmasq can't read it anymore. Signed-off-by: Nick Hainke --- package/network/services/dnsmasq/files/dnsmasq.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index aabae395b2..7fe8faa1cb 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -1122,7 +1122,7 @@ dnsmasq_start() procd_set_param respawn procd_add_jail dnsmasq ubus log - procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT + procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT /tmp/hosts/ procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile procd_close_instance From 76b4ccad4085aeeea4bbbd19124cab0b058302d2 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 19 Jul 2021 12:09:38 +0100 Subject: [PATCH 8/9] toolchain/binutils: add binutils 2.37 Tested on ath79/generic, without issues. Signed-off-by: Rui Salvaterra --- toolchain/binutils/Config.in | 4 ++ toolchain/binutils/Config.version | 4 ++ toolchain/binutils/Makefile | 4 ++ .../2.37/300-001_ld_makefile_patch.patch | 22 +++++++++++ .../400-mips_no_dynamic_linking_sym.patch | 18 +++++++++ ...e-default-emulation-for-mips64-linux.patch | 38 +++++++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch create mode 100644 toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch create mode 100644 toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index b436a66c98..4b9579379c 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -21,6 +21,10 @@ choice config BINUTILS_USE_VERSION_2_36_1 bool "Binutils 2.36.1" select BINUTILS_VERSION_2_36_1 + + config BINUTILS_USE_VERSION_2_37 + bool "Binutils 2.37" + select BINUTILS_VERSION_2_37 endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index 82ef9b8fc3..985e3b1b32 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -11,9 +11,13 @@ config BINUTILS_VERSION_2_35_2 config BINUTILS_VERSION_2_36_1 bool +config BINUTILS_VERSION_2_37 + bool + config BINUTILS_VERSION string default "2.32" if BINUTILS_VERSION_2_32 default "2.34" if BINUTILS_VERSION_2_34 default "2.35.2" if BINUTILS_VERSION_2_35_2 default "2.36.1" if BINUTILS_VERSION_2_36_1 + default "2.37" if BINUTILS_VERSION_2_37 diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 5d1b518343..d58f6662bb 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -31,6 +31,10 @@ ifeq ($(PKG_VERSION),2.36.1) PKG_HASH:=e81d9edf373f193af428a0f256674aea62a9d74dfe93f65192d4eae030b0f3b0 endif +ifeq ($(PKG_VERSION),2.37) + PKG_HASH:=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c +endif + HOST_BUILD_PARALLEL:=1 PATCH_DIR:=./patches/$(PKG_VERSION) diff --git a/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..f1cbb8198b --- /dev/null +++ b/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -561,7 +561,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 0000000000..070247ecf0 --- /dev/null +++ b/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -8057,6 +8057,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; + bh = NULL; ++ if (0) { + if (!(_bfd_generic_link_add_one_symbol + (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, + NULL, false, get_elf_backend_data (abfd)->collect, &bh))) +@@ -8069,6 +8070,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + if (! bfd_elf_link_record_dynamic_symbol (info, h)) + return false; ++ } + + if (! mips_elf_hash_table (info)->use_rld_obj_head) + { diff --git a/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 0000000000..c59843766e --- /dev/null +++ b/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,38 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -891,12 +891,12 @@ case "${targ}" in + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" + ;; + mips64*el-*-linux*) +- targ_defvec=mips_elf32_ntrad_le_vec +- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" + ;; + mips64*-*-linux*) +- targ_defvec=mips_elf32_ntrad_be_vec +- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" + ;; + mips*el-*-linux*) + targ_defvec=mips_elf32_trad_le_vec +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -530,12 +530,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx + ;; + mips*-*-windiss) targ_emul=elf32mipswindiss + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip From 019d8d222d5c17e6060f7acd940806c6e7239f3b Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 19 Jul 2021 00:56:46 +0100 Subject: [PATCH 9/9] elfutils: fix building with GCC 11 Add a patch to fix building with GCC 11, which triggers new warnings by enabling -Warray-parameter by default. Signed-off-by: Rui Salvaterra --- .../patches/111-fix-gcc11-build.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package/libs/elfutils/patches/111-fix-gcc11-build.patch diff --git a/package/libs/elfutils/patches/111-fix-gcc11-build.patch b/package/libs/elfutils/patches/111-fix-gcc11-build.patch new file mode 100644 index 0000000000..1ec880e34e --- /dev/null +++ b/package/libs/elfutils/patches/111-fix-gcc11-build.patch @@ -0,0 +1,22 @@ +--- a/libebl/libebl.h ++++ b/libebl/libebl.h +@@ -245,7 +245,7 @@ extern ssize_t ebl_register_info (Ebl *e + Each of these is filled with the DWARF register number corresponding, + or -1 if there is none. Returns zero when the information is available. */ + extern int ebl_syscall_abi (Ebl *ebl, int *sp, int *pc, +- int *callno, int args[6]); ++ int *callno, int args[]); + + /* Supply the ABI-specified state of DWARF CFI before CIE initial programs. + +--- a/libdw/libdw.h ++++ b/libdw/libdw.h +@@ -1065,7 +1065,7 @@ extern int dwarf_frame_cfa (Dwarf_Frame + expressions in the CFI, *OPS is an internal pointer that can be used as + long as the Dwarf_CFI used to create FRAME remains alive. */ + extern int dwarf_frame_register (Dwarf_Frame *frame, int regno, +- Dwarf_Op ops_mem[3], ++ Dwarf_Op ops_mem[], + Dwarf_Op **ops, size_t *nops) + __nonnull_attribute__ (3, 4, 5); +