Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd4918c855 | ||
|
|
92bd5e9fa0 | ||
|
|
dfbf20ede3 | ||
|
|
0e26d68844 | ||
|
|
0ba64629e8 | ||
|
|
b2bf0c6412 | ||
|
|
b51f89577f | ||
|
|
bb0a6658af | ||
|
|
7e427814b9 | ||
|
|
4f80800172 | ||
|
|
2cd078c466 | ||
|
|
1a551c0753 | ||
|
|
0cf378164c | ||
|
|
3bc6e2b10a | ||
|
|
5662a6230f | ||
|
|
bc8db10ae6 | ||
|
|
9822625a3d | ||
|
|
f142640e2e |
@@ -5,15 +5,15 @@ Default Kernel tree: 5.4
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Appliance | 5.4.86 |
|
||||
| Raspberry Pi | 5.4.79 |
|
||||
| Raspberry Pi 0-W | 5.4.79 |
|
||||
| Raspberry Pi 2 | 5.4.79 |
|
||||
| Raspberry Pi 3 | 5.4.79 |
|
||||
| Raspberry Pi 4 | 5.4.79 |
|
||||
| Tinker Board | 5.4.86 |
|
||||
| Open Virtual Appliance | 5.4.109 |
|
||||
| Raspberry Pi | 5.4.83 |
|
||||
| Raspberry Pi 0-W | 5.4.83 |
|
||||
| Raspberry Pi 2 | 5.4.83 |
|
||||
| Raspberry Pi 3 | 5.4.83 |
|
||||
| Raspberry Pi 4 | 5.4.83 |
|
||||
| Tinker Board | 5.4.109 |
|
||||
| Odroid-C2 | 5.9.16 |
|
||||
| Odroid-C4 | 5.9.16 |
|
||||
| Odroid-N2 | 5.9.16 |
|
||||
| Odroid-XU4 | 5.9.16 |
|
||||
| Intel NUC | 5.4.86 |
|
||||
| Intel NUC | 5.4.109 |
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From 625000fe2a9c1f78099895bf14c2f9753e359fba Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Mon, 15 Jun 2020 10:40:41 +0200
|
||||
Subject: [PATCH 1/8] dt-bindings: arm: bcm: Convert BCM2835 firmware binding
|
||||
Subject: [PATCH 1/7] dt-bindings: arm: bcm: Convert BCM2835 firmware binding
|
||||
to YAML
|
||||
|
||||
Convert the Raspberry Pi BCM2835 firmware binding document to YAML.
|
||||
@@ -83,5 +83,5 @@ index 000000000000..cec540c052b6
|
||||
+ };
|
||||
+...
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 3ad7fb9329eabd1d7f692f612742ca5ac38854a5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3ad7fb9329eabd1d7f692f612742ca5ac38854a5.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From 47ebc13878c0bff61aeac05bc376a795b26553cd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <47ebc13878c0bff61aeac05bc376a795b26553cd.1611839042.git.stefan@agner.ch>
|
||||
In-Reply-To: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
References: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Mon, 15 Jun 2020 10:40:42 +0200
|
||||
Subject: [PATCH 2/8] dt-bindings: clock: Add a binding for the RPi Firmware
|
||||
Subject: [PATCH 2/7] dt-bindings: clock: Add a binding for the RPi Firmware
|
||||
clocks
|
||||
|
||||
The firmware running on the RPi VideoCore can be used to discover and
|
||||
@@ -67,5 +67,5 @@ index cec540c052b6..b48ed875eb8e 100644
|
||||
};
|
||||
...
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 305aeb868929695699e04e26dd590e64ad3c42dd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <305aeb868929695699e04e26dd590e64ad3c42dd.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From 0f26a0a4b0a7db1b50ee0f31dde3a23da22945ed Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0f26a0a4b0a7db1b50ee0f31dde3a23da22945ed.1611839042.git.stefan@agner.ch>
|
||||
In-Reply-To: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
References: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Fri, 26 Jun 2020 13:54:33 +0200
|
||||
Subject: [PATCH 3/8] dt-bindings: arm: bcm: Add a select to the RPI Firmware
|
||||
Subject: [PATCH 3/7] dt-bindings: arm: bcm: Add a select to the RPI Firmware
|
||||
binding
|
||||
|
||||
The RaspberryPi firmware binding uses two compatible, include simple-bus.
|
||||
@@ -46,5 +46,5 @@ index b48ed875eb8e..17e4f20c8d39 100644
|
||||
compatible:
|
||||
items:
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 33743cfcff296b1011e46168ecab185a00e0f00d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <33743cfcff296b1011e46168ecab185a00e0f00d.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From eb9b3dff529cba1409ca17191954a7f26c2720ee Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <eb9b3dff529cba1409ca17191954a7f26c2720ee.1611839042.git.stefan@agner.ch>
|
||||
In-Reply-To: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
References: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:37 +0200
|
||||
Subject: [PATCH 4/8] dt-bindings: reset: Add a binding for the RPi Firmware
|
||||
Subject: [PATCH 4/7] dt-bindings: reset: Add a binding for the RPi Firmware
|
||||
reset controller
|
||||
|
||||
The firmware running on the RPi VideoCore can be used to reset and
|
||||
@@ -79,5 +79,5 @@ index 000000000000..1a4f4c792723
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From a97dba6bf04aa09279a7c5b4aec6e4520e354fbd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a97dba6bf04aa09279a7c5b4aec6e4520e354fbd.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From 78ad38829939c60437fd8a11cabc92679cc3e6df Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <78ad38829939c60437fd8a11cabc92679cc3e6df.1611839042.git.stefan@agner.ch>
|
||||
In-Reply-To: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
References: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:39 +0200
|
||||
Subject: [PATCH 5/8] ARM: dts: bcm2711: Add firmware usb reset node
|
||||
Subject: [PATCH 5/7] ARM: dts: bcm2711: Add firmware usb reset node
|
||||
|
||||
Now that the reset driver exposing Raspberry Pi 4's firmware based USB
|
||||
reset routine is available, let's add the device tree node exposing it.
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
index 21b20e334b1a..d77d61d41bbc 100644
|
||||
index b5daeee077ec..37f14d7fd4f0 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
@@ -72,6 +72,11 @@
|
||||
@@ -37,7 +37,7 @@ index 21b20e334b1a..d77d61d41bbc 100644
|
||||
|
||||
&gpio {
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-400.dts b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
index afd1ca215518..3a1eb65f7075 100644
|
||||
index 9454ce193ec5..a4f4e619d83c 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
@@ -72,6 +72,11 @@
|
||||
@@ -53,7 +53,7 @@ index afd1ca215518..3a1eb65f7075 100644
|
||||
|
||||
&gpio {
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
index 3ff0be02cb34..7f0a621a47f5 100644
|
||||
index fc3f062fd820..aa346b063b2a 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
@@ -84,6 +84,11 @@
|
||||
@@ -69,5 +69,5 @@ index 3ff0be02cb34..7f0a621a47f5 100644
|
||||
|
||||
&pwm1 {
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From c19d86704ffaa9fbe830aaa2a4015259928abf70 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c19d86704ffaa9fbe830aaa2a4015259928abf70.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From 874e651872c2b9e2a2a7f5e139197b9c8c96240b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <874e651872c2b9e2a2a7f5e139197b9c8c96240b.1611839042.git.stefan@agner.ch>
|
||||
In-Reply-To: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
References: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:40 +0200
|
||||
Subject: [PATCH 6/8] ARM: dts: bcm2711: Add reset controller to xHCI node
|
||||
Subject: [PATCH 6/7] ARM: dts: bcm2711: Add reset controller to xHCI node
|
||||
|
||||
The chip is hardwired to the board's PCIe bus and needs to be properly
|
||||
setup trough a firmware routine after a PCI fundamental reset. Pass the
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
3 files changed, 46 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
index d77d61d41bbc..513cae21e64c 100644
|
||||
index 37f14d7fd4f0..1139d60a643d 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
|
||||
@@ -3,6 +3,8 @@
|
||||
@@ -58,7 +58,7 @@ index d77d61d41bbc..513cae21e64c 100644
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-400.dts b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
index 3a1eb65f7075..c122aebd4d5e 100644
|
||||
index a4f4e619d83c..264f0226f1b0 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
|
||||
@@ -3,6 +3,8 @@
|
||||
@@ -93,7 +93,7 @@ index 3a1eb65f7075..c122aebd4d5e 100644
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
index 7f0a621a47f5..5eda5d096bfb 100644
|
||||
index aa346b063b2a..4c0f6b320656 100644
|
||||
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
|
||||
@@ -3,6 +3,8 @@
|
||||
@@ -123,5 +123,5 @@ index 7f0a621a47f5..5eda5d096bfb 100644
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From febaf077f14b86da1edaa01abee2d0bfcf7bdece Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <febaf077f14b86da1edaa01abee2d0bfcf7bdece.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From d862338cd866a6fe9541636b7948e4998d1dd01f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d862338cd866a6fe9541636b7948e4998d1dd01f.1611839042.git.stefan@agner.ch>
|
||||
In-Reply-To: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
References: <625000fe2a9c1f78099895bf14c2f9753e359fba.1611839042.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Tue, 2 Jun 2020 21:20:08 +0000
|
||||
Subject: [PATCH 8/8] ARM: dts: bcm283x: add compatible picked up by U-Boot
|
||||
Subject: [PATCH 7/7] ARM: dts: bcm283x: add compatible picked up by U-Boot
|
||||
|
||||
Without brcm,bcm2835-pl011 in compatible U-Boot uses the regular PL011
|
||||
driver which seems to crash when enable_uart=1 is not used. Using
|
||||
@@ -72,5 +72,5 @@ index 4426f9e6ba92..abcf677fe416 100644
|
||||
interrupts = <2 25>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
@@ -1,233 +0,0 @@
|
||||
From 189ef4e3aabe995021fdfb3ff9bfb3f9ffa5fae4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <189ef4e3aabe995021fdfb3ff9bfb3f9ffa5fae4.1609281882.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1609281882.git.stefan@agner.ch>
|
||||
From: Arnd Bergmann <arnd@arndb.de>
|
||||
Date: Fri, 13 Nov 2020 15:59:32 +0100
|
||||
Subject: [PATCH 7/8] arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where
|
||||
needed
|
||||
|
||||
Stefan Agner reported a bug when using zsram on 32-bit Arm machines
|
||||
with RAM above the 4GB address boundary:
|
||||
|
||||
Unable to handle kernel NULL pointer dereference at virtual address 00000000
|
||||
pgd = a27bd01c
|
||||
[00000000] *pgd=236a0003, *pmd=1ffa64003
|
||||
Internal error: Oops: 207 [#1] SMP ARM
|
||||
Modules linked in: mdio_bcm_unimac(+) brcmfmac cfg80211 brcmutil raspberrypi_hwmon hci_uart crc32_arm_ce bcm2711_thermal phy_generic genet
|
||||
CPU: 0 PID: 123 Comm: mkfs.ext4 Not tainted 5.9.6 #1
|
||||
Hardware name: BCM2711
|
||||
PC is at zs_map_object+0x94/0x338
|
||||
LR is at zram_bvec_rw.constprop.0+0x330/0xa64
|
||||
pc : [<c0602b38>] lr : [<c0bda6a0>] psr: 60000013
|
||||
sp : e376bbe0 ip : 00000000 fp : c1e2921c
|
||||
r10: 00000002 r9 : c1dda730 r8 : 00000000
|
||||
r7 : e8ff7a00 r6 : 00000000 r5 : 02f9ffa0 r4 : e3710000
|
||||
r3 : 000fdffe r2 : c1e0ce80 r1 : ebf979a0 r0 : 00000000
|
||||
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
|
||||
Control: 30c5383d Table: 235c2a80 DAC: fffffffd
|
||||
Process mkfs.ext4 (pid: 123, stack limit = 0x495a22e6)
|
||||
Stack: (0xe376bbe0 to 0xe376c000)
|
||||
|
||||
As it turns out, zsram needs to know the maximum memory size, which
|
||||
is defined in MAX_PHYSMEM_BITS when CONFIG_SPARSEMEM is set, or in
|
||||
MAX_POSSIBLE_PHYSMEM_BITS on the x86 architecture.
|
||||
|
||||
The same problem will be hit on all 32-bit architectures that have a
|
||||
physical address space larger than 4GB and happen to not enable sparsemem
|
||||
and include asm/sparsemem.h from asm/pgtable.h.
|
||||
|
||||
After the initial discussion, I suggested just always defining
|
||||
MAX_POSSIBLE_PHYSMEM_BITS whenever CONFIG_PHYS_ADDR_T_64BIT is
|
||||
set, or provoking a build error otherwise. This addresses all
|
||||
configurations that can currently have this runtime bug, but
|
||||
leaves all other configurations unchanged.
|
||||
|
||||
I looked up the possible number of bits in source code and
|
||||
datasheets, here is what I found:
|
||||
|
||||
- on ARC, CONFIG_ARC_HAS_PAE40 controls whether 32 or 40 bits are used
|
||||
- on ARM, CONFIG_LPAE enables 40 bit addressing, without it we never
|
||||
support more than 32 bits, even though supersections in theory allow
|
||||
up to 40 bits as well.
|
||||
- on MIPS, some MIPS32r1 or later chips support 36 bits, and MIPS32r5
|
||||
XPA supports up to 60 bits in theory, but 40 bits are more than
|
||||
anyone will ever ship
|
||||
- On PowerPC, there are three different implementations of 36 bit
|
||||
addressing, but 32-bit is used without CONFIG_PTE_64BIT
|
||||
- On RISC-V, the normal page table format can support 34 bit
|
||||
addressing. There is no highmem support on RISC-V, so anything
|
||||
above 2GB is unused, but it might be useful to eventually support
|
||||
CONFIG_ZRAM for high pages.
|
||||
|
||||
Fixes: 61989a80fb3a ("staging: zsmalloc: zsmalloc memory allocation library")
|
||||
Fixes: 02390b87a945 ("mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS")
|
||||
Cc: Stefan Agner <stefan@agner.ch>
|
||||
Cc: Mike Rapoport <rppt@kernel.org>
|
||||
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||
Cc: Nitin Gupta <ngupta@vflare.org>
|
||||
Cc: Minchan Kim <minchan@kernel.org>
|
||||
Cc: Vineet Gupta <vgupta@synopsys.com>
|
||||
Cc: linux-snps-arc@lists.infradead.org
|
||||
Cc: Russell King <linux@armlinux.org.uk>
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
Cc: linux-mips@vger.kernel.org
|
||||
Cc: Michael Ellerman <mpe@ellerman.id.au>
|
||||
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
Cc: Paul Mackerras <paulus@samba.org>
|
||||
Cc: linuxppc-dev@lists.ozlabs.org
|
||||
Cc: Paul Walmsley <paul.walmsley@sifive.com>
|
||||
Cc: Palmer Dabbelt <palmer@dabbelt.com>
|
||||
Cc: Albert Ou <aou@eecs.berkeley.edu>
|
||||
Cc: linux-riscv@lists.infradead.org
|
||||
Link: https://lore.kernel.org/linux-mm/bdfa44bf1c570b05d6c70898e2bbb0acf234ecdf.1604762181.git.stefan@agner.ch/
|
||||
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||
---
|
||||
arch/arc/include/asm/pgtable.h | 2 ++
|
||||
arch/arm/include/asm/pgtable-2level.h | 2 ++
|
||||
arch/arm/include/asm/pgtable-3level.h | 2 ++
|
||||
arch/mips/include/asm/pgtable-32.h | 3 +++
|
||||
arch/powerpc/include/asm/book3s/32/pgtable.h | 2 ++
|
||||
arch/powerpc/include/asm/nohash/32/pgtable.h | 2 ++
|
||||
arch/riscv/include/asm/pgtable-32.h | 2 ++
|
||||
include/asm-generic/pgtable.h | 13 +++++++++++++
|
||||
8 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
|
||||
index 7addd0301c51..6bdcf9b495b8 100644
|
||||
--- a/arch/arc/include/asm/pgtable.h
|
||||
+++ b/arch/arc/include/asm/pgtable.h
|
||||
@@ -135,8 +135,10 @@
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_PAE40
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (0xff00000000 | PAGE_MASK | _PAGE_CACHEABLE)
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#else
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (PAGE_MASK | _PAGE_CACHEABLE)
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
|
||||
index 51beec41d48c..50b51ac91fcb 100644
|
||||
--- a/arch/arm/include/asm/pgtable-2level.h
|
||||
+++ b/arch/arm/include/asm/pgtable-2level.h
|
||||
@@ -75,6 +75,8 @@
|
||||
#define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
+
|
||||
/*
|
||||
* PMD_SHIFT determines the size of the area a second-level page table can map
|
||||
* PGDIR_SHIFT determines what a third-level page table entry can map
|
||||
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
|
||||
index 5b18295021a0..8006a56cc2ce 100644
|
||||
--- a/arch/arm/include/asm/pgtable-3level.h
|
||||
+++ b/arch/arm/include/asm/pgtable-3level.h
|
||||
@@ -25,6 +25,8 @@
|
||||
#define PTE_HWTABLE_OFF (0)
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
+
|
||||
/*
|
||||
* PGDIR_SHIFT determines the size a top-level page table entry can map.
|
||||
*/
|
||||
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h
|
||||
index ba967148b016..2604fab8a92d 100644
|
||||
--- a/arch/mips/include/asm/pgtable-32.h
|
||||
+++ b/arch/mips/include/asm/pgtable-32.h
|
||||
@@ -155,6 +155,7 @@ static inline void pmd_clear(pmd_t *pmdp)
|
||||
|
||||
#if defined(CONFIG_XPA)
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#define pte_pfn(x) (((unsigned long)((x).pte_high >> _PFN_SHIFT)) | (unsigned long)((x).pte_low << _PAGE_PRESENT_SHIFT))
|
||||
static inline pte_t
|
||||
pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
@@ -170,6 +171,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
||||
#elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte_high >> 6))
|
||||
|
||||
static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
@@ -184,6 +186,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
||||
#else
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#ifdef CONFIG_CPU_VR41XX
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
|
||||
#define pfn_pte(pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
|
||||
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
index 0796533d37dd..7b6349be621a 100644
|
||||
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
@@ -37,8 +37,10 @@ static inline bool pte_user(pte_t pte)
|
||||
*/
|
||||
#ifdef CONFIG_PTE_64BIT
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
index 552b96eef0c8..3d32d7103ec8 100644
|
||||
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
@@ -148,8 +148,10 @@ int map_kernel_page(unsigned long va, phys_addr_t pa, pgprot_t prot);
|
||||
*/
|
||||
#if defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT)
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/arch/riscv/include/asm/pgtable-32.h b/arch/riscv/include/asm/pgtable-32.h
|
||||
index b0ab66e5fdb1..5b2e79e5bfa5 100644
|
||||
--- a/arch/riscv/include/asm/pgtable-32.h
|
||||
+++ b/arch/riscv/include/asm/pgtable-32.h
|
||||
@@ -14,4 +14,6 @@
|
||||
#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
|
||||
#define PGDIR_MASK (~(PGDIR_SIZE - 1))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 34
|
||||
+
|
||||
#endif /* _ASM_RISCV_PGTABLE_32_H */
|
||||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
|
||||
index 6fd08cf04add..7a8c43dee873 100644
|
||||
--- a/include/asm-generic/pgtable.h
|
||||
+++ b/include/asm-generic/pgtable.h
|
||||
@@ -1163,6 +1163,19 @@ static inline bool arch_has_pfn_modify_check(void)
|
||||
#define io_remap_pfn_range remap_pfn_range
|
||||
#endif
|
||||
|
||||
+#if !defined(MAX_POSSIBLE_PHYSMEM_BITS) && !defined(CONFIG_64BIT)
|
||||
+#ifdef CONFIG_PHYS_ADDR_T_64BIT
|
||||
+/*
|
||||
+ * ZSMALLOC needs to know the highest PFN on 32-bit architectures
|
||||
+ * with physical address space extension, but falls back to
|
||||
+ * BITS_PER_LONG otherwise.
|
||||
+ */
|
||||
+#error Missing MAX_POSSIBLE_PHYSMEM_BITS definition
|
||||
+#else
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
#ifndef has_transparent_hugepage
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#define has_transparent_hugepage() 1
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.86"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.109"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -23,7 +23,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.86"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.109"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi0-w $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/76c49e60e742d0bebd798be972d67dd3fd007691.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi2 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/76c49e60e742d0bebd798be972d67dd3fd007691.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/76c49e60e742d0bebd798be972d67dd3fd007691.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/76c49e60e742d0bebd798be972d67dd3fd007691.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/76c49e60e742d0bebd798be972d67dd3fd007691.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/76c49e60e742d0bebd798be972d67dd3fd007691.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/76c49e60e742d0bebd798be972d67dd3fd007691.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.86"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.109"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
VERSION_MAJOR=5
|
||||
VERSION_BUILD=10
|
||||
VERSION_BUILD=13
|
||||
|
||||
HASSOS_NAME="Home Assistant OS"
|
||||
HASSOS_ID="hassos"
|
||||
|
||||
@@ -2,7 +2,34 @@
|
||||
|
||||
##
|
||||
# Hooks
|
||||
env
|
||||
|
||||
case "$1" in
|
||||
install-check)
|
||||
if [ "$RAUC_MF_COMPATIBLE" = "$RAUC_SYSTEM_COMPATIBLE" ]; then
|
||||
exit 0
|
||||
fi
|
||||
# Be compatible with upcomming releases using haos OS ID
|
||||
# shellcheck disable=SC2039
|
||||
rauc_new_os_compatible=${RAUC_SYSTEM_COMPATIBLE/haos-/hassos-}
|
||||
if [ "$RAUC_MF_COMPATIBLE" = "${rauc_new_os_compatible}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
# intel-nuc: Be compatible with upcomming generic-x86-64
|
||||
# shellcheck disable=SC2039
|
||||
rauc_new_board_compatible=${rauc_new_os_compatible/generic-x86-64/intel-nuc}
|
||||
if [ "$RAUC_MF_COMPATIBLE" = "${rauc_new_board_compatible}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
echo "Compatible does not match!" 1>&2
|
||||
exit 10
|
||||
;;
|
||||
slot-install)
|
||||
# Use install handlers below
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Handle boot hocks
|
||||
if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then
|
||||
|
||||
@@ -14,5 +14,8 @@ backend=journal
|
||||
connection.mdns=2
|
||||
connection.llmnr=2
|
||||
|
||||
[connectivity]
|
||||
uri=https://version.home-assistant.io/online.txt
|
||||
|
||||
[device]
|
||||
wifi.scan-rand-mac-address=no
|
||||
|
||||
@@ -3,8 +3,6 @@ Description=HassOS boot partition
|
||||
DefaultDependencies=no
|
||||
Before=umount.target local-fs.target
|
||||
Conflicts=umount.target
|
||||
After=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2dboot.service
|
||||
Wants=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2dboot.service
|
||||
|
||||
[Mount]
|
||||
What=/dev/disk/by-label/hassos-boot
|
||||
|
||||
@@ -31,8 +31,7 @@ else
|
||||
|
||||
# For MBR, we have to calculate the last usable sector by ourselfs
|
||||
DEVICE_SIZE=$(blockdev --getsize64 "${DEVICE_ROOT}")
|
||||
SECTOR_SIZE=$(echo "${PART_TABLE}" | jq -r '.partitiontable.sectorsize')
|
||||
LAST_USABLE_LBA="$((DEVICE_SIZE / SECTOR_SIZE))"
|
||||
LAST_USABLE_LBA=$(echo "${PART_TABLE}" | jq -r "${DEVICE_SIZE} / .partitiontable.sectorsize")
|
||||
fi
|
||||
echo "[INFO] Last usable logical block ${LAST_USABLE_LBA}"
|
||||
|
||||
|
||||
@@ -69,9 +69,10 @@ if [ -z "${SUPERVISOR_CONTAINER_ID}" ]; then
|
||||
docker container create \
|
||||
--name hassio_supervisor \
|
||||
--privileged --security-opt apparmor="hassio-supervisor" \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /var/run/dbus:/var/run/dbus \
|
||||
-v /run/docker.sock:/run/docker.sock:rw \
|
||||
-v /run/dbus:/run/dbus:ro \
|
||||
-v /run/supervisor:/run/os:rw \
|
||||
-v /run/udev:/run/udev:ro \
|
||||
-v /etc/machine-id:/etc/machine-id:ro \
|
||||
-v ${SUPERVISOR_DATA}:/data:rw \
|
||||
-v /mnt/overlay:/os/overlay:rw \
|
||||
|
||||
@@ -32,6 +32,7 @@ function create_ota_update() {
|
||||
echo "version=$(hassos_version)"
|
||||
echo "[hooks]"
|
||||
echo "filename=hook"
|
||||
echo "hooks=install-check"
|
||||
echo "[image.boot]"
|
||||
echo "filename=boot.vfat"
|
||||
echo "hooks=install"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From dd83e231779b8daaeaa0a78d6686b80eeb49c12b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
From 53aff7f049c974ab861db563c24d31c5512d1fbc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Mon, 13 Jan 2020 12:27:06 +0000
|
||||
Subject: [PATCH 1/7] docker: add AppArmor support
|
||||
Subject: [PATCH 1/9] docker: add AppArmor support
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk
|
||||
index d9a0eb28a6..c68e3818a8 100644
|
||||
index 6b79bd14ae..2eed6e346b 100644
|
||||
--- a/package/docker-containerd/docker-containerd.mk
|
||||
+++ b/package/docker-containerd/docker-containerd.mk
|
||||
@@ -18,6 +18,11 @@ DOCKER_CONTAINERD_BUILD_TARGETS = cmd/ctr cmd/containerd cmd/containerd-shim
|
||||
@@ -45,11 +45,11 @@ index 8cedf307ba..7f898680b7 100644
|
||||
DOCKER_ENGINE_TAGS += seccomp
|
||||
DOCKER_ENGINE_DEPENDENCIES += libseccomp
|
||||
diff --git a/package/runc/runc.mk b/package/runc/runc.mk
|
||||
index 3d177d23d5..c559244e83 100644
|
||||
index 393bd7b22f..45fe1442ad 100644
|
||||
--- a/package/runc/runc.mk
|
||||
+++ b/package/runc/runc.mk
|
||||
@@ -12,6 +12,11 @@ RUNC_LICENSE_FILES = LICENSE
|
||||
RUNC_LDFLAGS = -X main.gitCommit=$(RUNC_VERSION)
|
||||
RUNC_LDFLAGS = -X main.version=$(RUNC_VERSION)
|
||||
RUNC_TAGS = cgo static_build
|
||||
|
||||
+ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
|
||||
@@ -61,5 +61,5 @@ index 3d177d23d5..c559244e83 100644
|
||||
RUNC_TAGS += seccomp
|
||||
RUNC_DEPENDENCIES += libseccomp host-pkgconf
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 7c7198d6075748a5f831c0068441695455d06e6f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <7c7198d6075748a5f831c0068441695455d06e6f.1607000394.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
From b24a9853bf61b59c44f5b5e0c02a41e07b6d776f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b24a9853bf61b59c44f5b5e0c02a41e07b6d776f.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 16 Apr 2020 11:51:46 +0000
|
||||
Subject: [PATCH 2/7] rpi-firmware: Bump firmware
|
||||
Subject: [PATCH 2/9] rpi-firmware: Bump firmware
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@@ -19,7 +19,7 @@ index 8730ec959b..49a600903c 100644
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed
|
||||
-sha256 c7a8c2b8cfe1977095d62086d340d6c15a383562aba2742e21df7f5f792aeb4b rpi-firmware-358f4c271f2bc10931aae8fe0879ffaded8b9c44.tar.gz
|
||||
+sha256 30e91cc1b502bb1a8aeddf49e7d9dd3fb4a8c2f3b9154a2fea9ecc9071f54bc7 rpi-firmware-2ba11f2a07760588546821aed578010252c9ecb3.tar.gz
|
||||
+sha256 e77016c80ec63ccd591f8aa4d46a5e27eddea1aaf3aedcd38098549588c32243 rpi-firmware-0d458874a89921fbe460e422b239695e1e101e2b.tar.gz
|
||||
sha256 c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b boot/LICENCE.broadcom
|
||||
diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
|
||||
index 8b2b2c7154..fe7a099407 100644
|
||||
@@ -30,10 +30,10 @@ index 8b2b2c7154..fe7a099407 100644
|
||||
################################################################################
|
||||
|
||||
-RPI_FIRMWARE_VERSION = 358f4c271f2bc10931aae8fe0879ffaded8b9c44
|
||||
+RPI_FIRMWARE_VERSION = 2ba11f2a07760588546821aed578010252c9ecb3
|
||||
+RPI_FIRMWARE_VERSION = 0d458874a89921fbe460e422b239695e1e101e2b
|
||||
RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION))
|
||||
RPI_FIRMWARE_LICENSE = BSD-3-Clause
|
||||
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 506a2a77b2967f911f93a3941bfbdfe9f6acfa77 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <506a2a77b2967f911f93a3941bfbdfe9f6acfa77.1607000394.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
From 15db6339b4bdd202c44c663edcdc82b6d2f07652 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <15db6339b4bdd202c44c663edcdc82b6d2f07652.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 16 Apr 2020 14:32:45 +0000
|
||||
Subject: [PATCH 3/7] network-manager: wpa_supplicant
|
||||
Subject: [PATCH 3/9] network-manager: wpa_supplicant
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@@ -42,5 +42,5 @@ index 3dc3188f32..2a04b00cee 100644
|
||||
NETWORK_MANAGER_LICENSE_FILES = COPYING COPYING.LGPL CONTRIBUTING
|
||||
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From ad1b1c5ef75626ae0fc735473034ca1b571dc281 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ad1b1c5ef75626ae0fc735473034ca1b571dc281.1607000394.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
From bd1542bc2e242b189b4a778cb879e3416c40b60a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <bd1542bc2e242b189b4a778cb879e3416c40b60a.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 16 Apr 2020 12:01:44 +0000
|
||||
Subject: [PATCH 4/7] Fix dhcp client
|
||||
Subject: [PATCH 4/9] Fix dhcp client
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@@ -26,5 +26,5 @@ index ad59804d3b..f1ffa81d9a 100644
|
||||
install-sbinPROGRAMS
|
||||
$(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 51babd578150f840311099d54abf8ea39b2127e6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <51babd578150f840311099d54abf8ea39b2127e6.1607000394.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
From ff288c78226a2e61abf75bb285b429299e384edd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ff288c78226a2e61abf75bb285b429299e384edd.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 16 Apr 2020 12:05:21 +0000
|
||||
Subject: [PATCH 5/7] rpi: use latest wifi driver
|
||||
Subject: [PATCH 5/9] rpi: use latest wifi driver
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@@ -44,5 +44,5 @@ index 6be02509fe..0c697bddbe 100644
|
||||
|
||||
$(eval $(generic-package))
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
From 4526121b86b259e426766c4ba35b2911b2c0965c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <4526121b86b259e426766c4ba35b2911b2c0965c.1607000394.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
From 3a34b131d0d7a1630e70f60c3bd62240d3b1b654 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3a34b131d0d7a1630e70f60c3bd62240d3b1b654.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 11 Nov 2020 22:16:10 +0100
|
||||
Subject: [PATCH 6/7] ODROID-XU4: video firmware
|
||||
Subject: [PATCH 6/9] package/linux-firmware: add new option for Samsung MFC
|
||||
firmware
|
||||
|
||||
Multi format codec (MFC) is the IP present in Samsung Exynos
|
||||
series SoCs for video encoding/decoding operations.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
package/linux-firmware/Config.in | 6 ++++++
|
||||
package/linux-firmware/Config.in | 5 +++++
|
||||
package/linux-firmware/linux-firmware.mk | 6 ++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in
|
||||
index 105daf42b8..109af152f8 100644
|
||||
index 105daf42b8..dbdfdb52b3 100644
|
||||
--- a/package/linux-firmware/Config.in
|
||||
+++ b/package/linux-firmware/Config.in
|
||||
@@ -44,6 +44,12 @@ config BR2_PACKAGE_LINUX_FIRMWARE_QCOM_ADRENO
|
||||
@@ -44,6 +44,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_QCOM_ADRENO
|
||||
help
|
||||
Firmware files for Qualcomm Adreno GPU firmware
|
||||
|
||||
+
|
||||
+config BR2_PACKAGE_LINUX_FIRMWARE_MFC_V8
|
||||
+ bool "Samsung MFC video encoder/decoder driver v8"
|
||||
+ bool "Samsung MFC video encoder/decoder v8 firmware"
|
||||
+ help
|
||||
+ Firmware files for samsung MFC video encoder/decoder driver v8
|
||||
+ Firmware files for Samsung MFC video encoder/decoder driver v8
|
||||
+
|
||||
endmenu # Video
|
||||
|
||||
@@ -46,5 +50,5 @@ index 8808b5284c..f1c84a134d 100644
|
||||
ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IBT),y)
|
||||
LINUX_FIRMWARE_FILES += intel/ibt-*
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From 0feaec5aace7006f2a4afbb8d69541acac0842e4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0feaec5aace7006f2a4afbb8d69541acac0842e4.1607000394.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1607000394.git.stefan@agner.ch>
|
||||
From dc54a32cb53394e21bc5dd65c10a847944864a2b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <dc54a32cb53394e21bc5dd65c10a847944864a2b.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 7 May 2020 09:02:05 +0000
|
||||
Subject: [PATCH 7/7] docker-proxy: Bump version
|
||||
Subject: [PATCH 7/9] docker-proxy: Bump version
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@@ -37,5 +37,5 @@ index 6600b24ed9..d0e940db93 100644
|
||||
DOCKER_PROXY_LICENSE = Apache-2.0
|
||||
DOCKER_PROXY_LICENSE_FILES = LICENSE
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
From a19d20fdbeab82cfe0c972ef6b2a292b582011cb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a19d20fdbeab82cfe0c972ef6b2a292b582011cb.1608480376.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1608480376.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1608480376.git.stefan@agner.ch>
|
||||
From 6ca8035a4ffbb4e6de6fd128a1e6a638bb974f11 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <6ca8035a4ffbb4e6de6fd128a1e6a638bb974f11.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Sun, 20 Dec 2020 16:57:09 +0100
|
||||
Subject: [PATCH 8/8] systemd: Bump to latest systemd-stable release 246.9
|
||||
Subject: [PATCH 8/9] systemd: Bump to latest systemd-stable release 246.10
|
||||
|
||||
---
|
||||
...o-not-fail-with-read-only-etc-or-var.patch | 34 -------------------
|
||||
@@ -54,18 +54,18 @@ index 01e7f1e906..0000000000
|
||||
-2.25.4
|
||||
-
|
||||
diff --git a/package/systemd/systemd.hash b/package/systemd/systemd.hash
|
||||
index cad249199c..2b41ee55f9 100644
|
||||
index cad249199c..0c2ba1e1c3 100644
|
||||
--- a/package/systemd/systemd.hash
|
||||
+++ b/package/systemd/systemd.hash
|
||||
@@ -1,5 +1,5 @@
|
||||
# sha256 locally computed
|
||||
-sha256 f45c5a98d3be7dd05ed7f1e1a0ab00c7ba52602aa2dc42615bf74be61fcbe178 systemd-246.5.tar.gz
|
||||
+sha256 944f264141ee12199124fe09e811173a3cec72f3db195844707260ee56ad9220 systemd-246.9.tar.gz
|
||||
+sha256 3a972d287edd864e0b33321bc74dfe6083d390306461fa7e958895eaa4be6b67 systemd-246.10.tar.gz
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL2
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSE.LGPL2.1
|
||||
sha256 b142af99a3d950fb465326d6fd5a49d348523dc0d216682880527264d0a011e9 README
|
||||
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
|
||||
index cb12f667d6..1e4171a9e2 100644
|
||||
index ddd3f4380e..51a3160050 100644
|
||||
--- a/package/systemd/systemd.mk
|
||||
+++ b/package/systemd/systemd.mk
|
||||
@@ -4,7 +4,7 @@
|
||||
@@ -73,10 +73,10 @@ index cb12f667d6..1e4171a9e2 100644
|
||||
################################################################################
|
||||
|
||||
-SYSTEMD_VERSION = 246.5
|
||||
+SYSTEMD_VERSION = 246.9
|
||||
+SYSTEMD_VERSION = 246.10
|
||||
SYSTEMD_SITE = $(call github,systemd,systemd-stable,v$(SYSTEMD_VERSION))
|
||||
SYSTEMD_LICENSE = LGPL-2.1+, GPL-2.0+ (udev), Public Domain (few source files, see README), BSD-3-Clause (tools/chromiumos)
|
||||
SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README tools/chromiumos/LICENSE
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 2a63d2fb5dc2a51888737af1d3e868b4b8cf74c8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2a63d2fb5dc2a51888737af1d3e868b4b8cf74c8.1608718424.git.stefan@agner.ch>
|
||||
In-Reply-To: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1608718424.git.stefan@agner.ch>
|
||||
References: <dd83e231779b8daaeaa0a78d6686b80eeb49c12b.1608718424.git.stefan@agner.ch>
|
||||
From 5296f74bba93a16fe1db5493f36e35fad434f9ee Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <5296f74bba93a16fe1db5493f36e35fad434f9ee.1612369715.git.stefan@agner.ch>
|
||||
In-Reply-To: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
References: <53aff7f049c974ab861db563c24d31c5512d1fbc.1612369715.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Wed, 23 Dec 2020 10:53:20 +0100
|
||||
Subject: [PATCH 9/9] package/linux-firmware: add new option for USB TI
|
||||
@@ -49,5 +49,5 @@ index f1c84a134d..f00fb2e6ae 100644
|
||||
define LINUX_FIRMWARE_INSTALL_FILES
|
||||
cd $(@D) && \
|
||||
--
|
||||
2.29.2
|
||||
2.30.0
|
||||
|
||||
|
||||
@@ -1,3 +1,64 @@
|
||||
2020.11.3, released February 17th, 2021
|
||||
|
||||
meson: Fix ccache detection handling when per-package builds
|
||||
are used.
|
||||
|
||||
Fakeroot: Fix compatibility issue with glibc 2.33
|
||||
|
||||
Updated/fixed packages: atftp, binutils, busybox, cereal,
|
||||
chartjs, connman, dhcpcd, dnsmasq, docker-cli, docker-engine,
|
||||
ebtables, fakeroot, flashrom, go, gst1-python, guile,
|
||||
intel-mediadriver, intel-microcode, jasper,
|
||||
kodi-inputstream-adaptive, lcms2, libbsd, libopenssl,
|
||||
makedumpfile, memtester, mosquitto, ne10, openblas, orc, php,
|
||||
postgresql, privoxy, pugixml, python-bottle, python-django,
|
||||
python3, rauc, sox, stress-ng, subversion, tzdate,
|
||||
uboot-tools, uclibc, webkitgtk, wireguard-linux-compat,
|
||||
wireshark, wpa_supplicant, wpewebkit, xenomai,
|
||||
xserver_xorg-server, xterm
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#11706: binman (U-boot tool) cannot find libfdt "binman: No mod..
|
||||
#13506: BR2_PACKAGE_DHCPCD missing directory creation
|
||||
|
||||
2020.11.2, released January 31st, 2021
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
Download: Ensure git submodules are correctly fetched if
|
||||
enabled for a package with <pkg>_GIT_SUBMODULES = YES and the
|
||||
host variant is downloaded first.
|
||||
|
||||
Toolchain: Mark CodeSourcery Aarch64 2014.11 toolchain as not
|
||||
having libatomic. Bootlin PowerPC-440 FP toolchain updated for
|
||||
SecurePLT fix.
|
||||
|
||||
pkg-stats: Fix python 3.8+ deprecation warning.
|
||||
|
||||
meson: Ensure ccache is not detected and used, as it may
|
||||
conflict with the ccache handling in Buildroot.
|
||||
|
||||
Updated/fixed packages: barebox, boost, brltty, dbus,
|
||||
docker-containerd, dovecot, dovecot-pigeonhole,
|
||||
environment-setup, firmware-imx, gcc, gerbera, glibc,
|
||||
gmrender-resurrect, igd2-for-linux, kodi-pvr-zattoo, libclc,
|
||||
libfuse3, libllcp, libodb-mysql, libtorrent-rasterbar,
|
||||
libupnp, lpc32xxcdl, luarocks, mpd, multipath-tools, mutt,
|
||||
nfs-utils, nodejs, openjpeg, openldap, opentracing-cpp,
|
||||
openvpn, p11-kit, paho-mqtt-c, php, poppler, postgresql,
|
||||
python3, redis, resiprocate, rpm, runc, socat, sslh, sudo,
|
||||
sunxi-mali-mainline-driver, syslog-ng, systemd, tini,
|
||||
tpm2-tss, trace-cmd, tzdata, uboot-tools, uhd, ushare,
|
||||
util-linux, vlc, wavpack, wireguard-linux-compat, wolfssl,
|
||||
xapp_xload, xorriso, zic
|
||||
|
||||
Removed packages: libupnp18
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#13471: package/mpd/mpd.conf make use of path not created
|
||||
|
||||
2020.11.1, released December 27th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
@@ -146,6 +146,16 @@ endif
|
||||
|
||||
comment "Legacy options removed in 2020.11"
|
||||
|
||||
config BR2_PACKAGE_LIBUPNP18
|
||||
bool "libupnp18 package removed"
|
||||
select BR2_LEGACY
|
||||
select BR2_PACKAGE_LIBUPNP
|
||||
help
|
||||
Version 1.8.x of libupnp (i.e. libupnp18) has been removed
|
||||
because it will never be fixed against CallStranger a.k.a.
|
||||
CVE-2020-12695. The libupnp package (which has been updated to
|
||||
version 1.14.x) has been selected instead.
|
||||
|
||||
config BR2_PACKAGE_OPENCV
|
||||
bool "opencv package was removed"
|
||||
select BR2_LEGACY
|
||||
|
||||
@@ -405,6 +405,7 @@ F: package/perl-netaddr-ip/
|
||||
F: package/perl-timedate/
|
||||
F: package/perl-uri/
|
||||
F: package/perl-www-robotrules/
|
||||
F: package/php/
|
||||
F: package/pixman/
|
||||
F: package/pngquant/
|
||||
F: package/pound/
|
||||
@@ -851,7 +852,6 @@ F: package/librsync/
|
||||
F: package/libsoup/
|
||||
F: package/libsoxr/
|
||||
F: package/libupnp/
|
||||
F: package/libupnp18/
|
||||
F: package/libv4l/
|
||||
F: package/libxslt/
|
||||
F: package/mbedtls/
|
||||
@@ -1033,11 +1033,6 @@ F: package/python-redis/
|
||||
F: package/python-rpi-ws281x/
|
||||
F: package/python-wtforms/
|
||||
|
||||
N: Guillaume Gardet <guillaume.gardet@oliseo.fr>
|
||||
F: package/c-icap/
|
||||
F: package/c-icap-modules/
|
||||
F: package/sdl2/
|
||||
|
||||
N: Guillaume William Brs <guillaume.bressaix@gmail.com>
|
||||
F: package/libnids/
|
||||
F: package/liquid-dsp/
|
||||
@@ -2165,10 +2160,6 @@ F: package/gupnp-av/
|
||||
F: package/let-me-create/
|
||||
F: package/nanomsg/
|
||||
|
||||
N: Rahul Jain <rahul.jain@imgtec.com>
|
||||
F: package/uhttpd/
|
||||
F: package/ustream-ssl/
|
||||
|
||||
N: Ramon Fried <rfried.dev@gmail.com>
|
||||
F: package/bitwise/
|
||||
|
||||
@@ -2254,6 +2245,7 @@ F: package/ogre/
|
||||
F: package/openpowerlink/
|
||||
F: package/physfs/
|
||||
F: package/piglit/
|
||||
F: package/qemu/
|
||||
F: package/solarus/
|
||||
F: package/stress-ng/
|
||||
F: package/supertux/
|
||||
@@ -2591,7 +2583,7 @@ F: toolchain/
|
||||
N: Timo Ketola <timo.ketola@exertus.fi>
|
||||
F: package/fbgrab/
|
||||
|
||||
N: Titouan Christophe <titouan.christophe@railnova.eu>
|
||||
N: Titouan Christophe <titouanchristophe@gmail.com>
|
||||
F: package/avro-c/
|
||||
F: package/mosquitto/
|
||||
F: package/python-avro/
|
||||
|
||||
@@ -92,9 +92,9 @@ all:
|
||||
.PHONY: all
|
||||
|
||||
# Set and export the version string
|
||||
export BR2_VERSION := 2020.11.1
|
||||
export BR2_VERSION := 2020.11.3
|
||||
# Actual time the release is cut (for reproducible builds)
|
||||
BR2_VERSION_EPOCH = 1609079000
|
||||
BR2_VERSION_EPOCH = 1613586000
|
||||
|
||||
# Save running make version since it's clobbered by the make package
|
||||
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
|
||||
|
||||
@@ -138,6 +138,11 @@ define $(1)_INSTALL_IMAGES_CMDS
|
||||
$$($(1)_INSTALL_CUSTOM_ENV)
|
||||
endef
|
||||
|
||||
# Starting with barebox v2020.09.0, the kconfig used calls the
|
||||
# cross-compiler to check its capabilities. So we need the
|
||||
# toolchain before we can call the configurators.
|
||||
$(1)_KCONFIG_DEPENDENCIES += toolchain
|
||||
|
||||
ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y)
|
||||
define $(1)_INSTALL_TARGET_CMDS
|
||||
cp $$(@D)/scripts/bareboxenv-target $$(TARGET_DIR)/usr/bin/bareboxenv
|
||||
|
||||
2
buildroot/boot/lpc32xxcdl/lpc32xxcdl.hash
Normal file
2
buildroot/boot/lpc32xxcdl/lpc32xxcdl.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 ded3fa936a96d3fb8188ca6214f57b5208bd49e5416bd69f38bfc810b34197bc lpc32xx_cdl-v2.11.zip
|
||||
@@ -4,9 +4,9 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LPC32XXCDL_VERSION = lpc32xx_cdl_v2.11
|
||||
LPC32XXCDL_SITE = http://git.lpcware.com/lpc3xxx_cdl.git
|
||||
LPC32XXCDL_SITE_METHOD = git
|
||||
LPC32XXCDL_VERSION = 2.11
|
||||
LPC32XXCDL_SOURCE = lpc32xx_cdl-v$(LPC32XXCDL_VERSION).zip
|
||||
LPC32XXCDL_SITE = https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/lpcware-archive/61/2
|
||||
|
||||
LPC32XXCDL_INSTALL_TARGET = NO
|
||||
LPC32XXCDL_INSTALL_IMAGES = YES
|
||||
@@ -45,13 +45,14 @@ LPC32XXCDL_BOARD_STARTUP_DIR = \
|
||||
# Source files are with dos newlines, which our patch infrastructure doesn't
|
||||
# handle. Work around it by converting the affected files to unix newlines
|
||||
# before patching
|
||||
define LPC32XXCDL_DOS2UNIX_FOR_PATCH
|
||||
define LPC32XXCDL_EXTRACT_CMDS
|
||||
unzip $(LPC32XXCDL_DL_DIR)/$(LPC32XXCDL_SOURCE) -d $(@D)
|
||||
mv $(@D)/lpc3xxx_cdl/* $(@D)
|
||||
rmdir $(@D)/lpc3xxx_cdl/
|
||||
sed -n 's|^[+-]\{3\} [^/]\+\([^ \t]*\)\(.*\)|$(@D)\1|p' \
|
||||
boot/lpc32xxcdl/*.patch| sort -u | xargs $(SED) 's/\x0D$$//'
|
||||
endef
|
||||
|
||||
LPC32XXCDL_POST_EXTRACT_HOOKS += LPC32XXCDL_DOS2UNIX_FOR_PATCH
|
||||
|
||||
define LPC32XXCDL_BUILD_CMDS
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)
|
||||
|
||||
@@ -126,14 +126,19 @@ typical packages will therefore only use a few of them.
|
||||
in the build step. These are passed after the +make+ command. By
|
||||
default, empty.
|
||||
|
||||
* +LIBFOO_INSTALL_OPTS+ contains the make options used to
|
||||
install the package to the host directory. By default, the value
|
||||
is +install+, which is correct for most CMake packages. It is still
|
||||
possible to override it.
|
||||
|
||||
* +LIBFOO_INSTALL_STAGING_OPTS+ contains the make options used to
|
||||
install the package to the staging directory. By default, the value
|
||||
is +DESTDIR=$(STAGING_DIR) install+, which is correct for most
|
||||
is +DESTDIR=$(STAGING_DIR) install/fast+, which is correct for most
|
||||
CMake packages. It is still possible to override it.
|
||||
|
||||
* +LIBFOO_INSTALL_TARGET_OPTS+ contains the make options used to
|
||||
install the package to the target directory. By default, the value
|
||||
is +DESTDIR=$(TARGET_DIR) install+. The default value is correct
|
||||
is +DESTDIR=$(TARGET_DIR) install/fast+. The default value is correct
|
||||
for most CMake packages, but it is still possible to override it if
|
||||
needed.
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -174,13 +174,13 @@ List of Examples
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
Buildroot 2020.11.1 manual generated on 2020-12-27 14:25:17 UTC from
|
||||
git revision 804a9e1865
|
||||
Buildroot 2020.11.3 manual generated on 2021-02-17 18:26:17 UTC from
|
||||
git revision 610e67b1fc
|
||||
|
||||
The Buildroot manual is written by the Buildroot developers. It is
|
||||
licensed under the GNU General Public License, version 2. Refer to
|
||||
the COPYING [http://git.buildroot.org/buildroot/tree/COPYING?id=
|
||||
804a9e18656c1584b059129e0b5cebe2a2405fac] file in the Buildroot
|
||||
610e67b1fc4ac44e0c4a7ba437c917ad6d63f481] file in the Buildroot
|
||||
sources for the full text of this license.
|
||||
|
||||
Copyright © 2004-2020 The Buildroot developers
|
||||
@@ -1710,7 +1710,7 @@ you to just prepare the SDK with make prepare-sdk without actually
|
||||
generating a tarball.
|
||||
|
||||
For your convenience, by selecting the option
|
||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP, you can get a setup-environment
|
||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP, you can get a environment-setup
|
||||
script installed in output/host/ and therefore in your SDK. This
|
||||
script can be sourced with . your/sdk/path/environment-setup to
|
||||
export a number of environment variables that will help cross-compile
|
||||
@@ -5225,13 +5225,17 @@ typical packages will therefore only use a few of them.
|
||||
* LIBFOO_MAKE_OPTS, to specify additional variables to pass to make
|
||||
in the build step. These are passed after the make command. By
|
||||
default, empty.
|
||||
* LIBFOO_INSTALL_OPTS contains the make options used to install the
|
||||
package to the host directory. By default, the value is install,
|
||||
which is correct for most CMake packages. It is still possible to
|
||||
override it.
|
||||
* LIBFOO_INSTALL_STAGING_OPTS contains the make options used to
|
||||
install the package to the staging directory. By default, the
|
||||
value is DESTDIR=$(STAGING_DIR) install, which is correct for
|
||||
most CMake packages. It is still possible to override it.
|
||||
value is DESTDIR=$(STAGING_DIR) install/fast, which is correct
|
||||
for most CMake packages. It is still possible to override it.
|
||||
* LIBFOO_INSTALL_TARGET_OPTS contains the make options used to
|
||||
install the package to the target directory. By default, the
|
||||
value is DESTDIR=$(TARGET_DIR) install. The default value is
|
||||
value is DESTDIR=$(TARGET_DIR) install/fast. The default value is
|
||||
correct for most CMake packages, but it is still possible to
|
||||
override it if needed.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ generating a tarball.
|
||||
|
||||
For your convenience, by selecting the option
|
||||
+BR2_PACKAGE_HOST_ENVIRONMENT_SETUP+, you can get a
|
||||
+setup-environment+ script installed in +output/host/+ and therefore
|
||||
+environment-setup+ script installed in +output/host/+ and therefore
|
||||
in your SDK. This script can be sourced with
|
||||
+. your/sdk/path/environment-setup+ to export a number of environment
|
||||
variables that will help cross-compile your projects using the
|
||||
|
||||
@@ -125,7 +125,7 @@ endif
|
||||
|
||||
config BR2_LINUX_KERNEL_VERSION
|
||||
string
|
||||
default "5.9.14" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default "5.9.16" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default "4.19.152-cip37" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
|
||||
default "4.19.152-cip37-rt16" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
|
||||
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# From https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc
|
||||
sha256 39fcfb41dcdf71b6b42b88eff3d8cedbe7523830ccae847f3914c0b97e1e6b49 linux-5.9.14.tar.xz
|
||||
sha256 b0d7abae88e5f91893627c645e680a95c818defd1b4fcaf3e2afb4b2b6b4ab86 linux-5.9.16.tar.xz
|
||||
sha256 4ab4a3f694b7b4cfbe78871eab34c8039ad33692144c45c669827a594da85534 linux-5.8.18.tar.xz
|
||||
sha256 beec970bbb93de8ab839f27930f7ab00c7bd65af0ffa07a50e765affdc2561c6 linux-5.4.83.tar.xz
|
||||
sha256 030ae544f346bfa2ce619dd9e17e93d10ec393632d3b6d6cf5d1fc84b914d449 linux-5.4.95.tar.xz
|
||||
# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
|
||||
sha256 e52a49ceb639d871478a143c314648c35e22222c317ecdf49866830fea5c3dfc linux-4.4.248.tar.xz
|
||||
sha256 4687268061c9933c298b30d28e4bf1a30dfbab7c0da4bee194968e4f81ffeccf linux-4.9.248.tar.xz
|
||||
sha256 0e1bc32c4842c3bbee3a15454408f528acd4d3c5e83312b93008d5ee2e9a0c79 linux-4.14.212.tar.xz
|
||||
sha256 3eeec4e5eb8a129be3536357ecb028fae7d82fac933dcfac0b6089ee398fc5fc linux-4.19.163.tar.xz
|
||||
sha256 2f3830ed4767b27dc6ead9af5c802eed7258b28c527efe90ce188cc6bd668550 linux-4.4.255.tar.xz
|
||||
sha256 afdf2d03c920f6b12f4e207ab18e45fbe2d7f4a61c066eff0d9916fc5d00c118 linux-4.9.255.tar.xz
|
||||
sha256 75eecaa731c091fcf3bc2ec914b01d299a447d78041cb66a11a2ab169eb801dd linux-4.14.219.tar.xz
|
||||
sha256 d2fdd236e6f31aa8e939f4a686c95417d8571bde3d091fc6a2535937c144195f linux-4.19.173.tar.xz
|
||||
# Locally computed
|
||||
sha256 d2a06f52143deb929b8d513cf9afc9bd065951389a80fa70bc4d63025b5b3fb9 linux-cip-4.19.152-cip37.tar.gz
|
||||
sha256 bc1dacd3d0f526de3e8754a444e8e02a54521527af639ddb907cb35cda775a8c linux-cip-4.19.152-cip37-rt16.tar.gz
|
||||
|
||||
@@ -1764,7 +1764,6 @@ menu "Networking"
|
||||
source "package/libuev/Config.in"
|
||||
source "package/libuhttpd/Config.in"
|
||||
source "package/libupnp/Config.in"
|
||||
source "package/libupnp18/Config.in"
|
||||
source "package/libupnpp/Config.in"
|
||||
source "package/liburiparser/Config.in"
|
||||
source "package/libuwsc/Config.in"
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
From 96409ef3b9ca061f9527cfaafa778105cf15d994 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Kaestle <peter.kaestle@nokia.com>
|
||||
Date: Wed, 14 Oct 2020 14:02:41 +0200
|
||||
Subject: [PATCH] Fix for DoS issue CVE-2020-6097
|
||||
|
||||
"sockaddr_print_addr" of tftpd can be triggered remotely to call
|
||||
assert(), which will crash the tftpd daemon. See:
|
||||
https://talosintelligence.com/vulnerability_reports/TALOS-2020-1029
|
||||
|
||||
"sockaddr_print_addr" originaly had two features:
|
||||
1) returning pointer to string of the incoming ip address
|
||||
2) checking whether ss_family of the connection is supported
|
||||
|
||||
To fix the issue, a separate function "sockaddr_family_supported" is
|
||||
used to take care of 2) and "sockaddr_print_addr" returns an error
|
||||
message string for unsupported cases when using 1) insert of calling
|
||||
assert().
|
||||
|
||||
[Upstream:
|
||||
https://sourceforge.net/u/peterkaestle/atftp/ci/96409ef3b9ca061f9527cfaafa778105cf15d994/]
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
tftp_def.c | 11 ++++++++++-
|
||||
tftp_def.h | 1 +
|
||||
tftpd.c | 5 +++++
|
||||
tftpd_mtftp.c | 5 +++++
|
||||
4 files changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tftp_def.c b/tftp_def.c
|
||||
index d457c2a..428a930 100644
|
||||
--- a/tftp_def.c
|
||||
+++ b/tftp_def.c
|
||||
@@ -180,6 +180,15 @@ int Gethostbyname(char *addr, struct hostent *host)
|
||||
return OK;
|
||||
}
|
||||
|
||||
+int
|
||||
+sockaddr_family_supported(const struct sockaddr_storage *ss)
|
||||
+{
|
||||
+ if (ss->ss_family == AF_INET || ss->ss_family == AF_INET6)
|
||||
+ return 1;
|
||||
+ else
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
char *
|
||||
sockaddr_print_addr(const struct sockaddr_storage *ss, char *buf, size_t len)
|
||||
{
|
||||
@@ -189,7 +198,7 @@ sockaddr_print_addr(const struct sockaddr_storage *ss, char *buf, size_t len)
|
||||
else if (ss->ss_family == AF_INET6)
|
||||
addr = &((const struct sockaddr_in6 *)ss)->sin6_addr;
|
||||
else
|
||||
- assert(!"sockaddr_print: unsupported address family");
|
||||
+ return "sockaddr_print: unsupported address family";
|
||||
return (char *)inet_ntop(ss->ss_family, addr, buf, len);
|
||||
}
|
||||
|
||||
diff --git a/tftp_def.h b/tftp_def.h
|
||||
index 0841746..458e310 100644
|
||||
--- a/tftp_def.h
|
||||
+++ b/tftp_def.h
|
||||
@@ -54,6 +54,7 @@ int print_eng(double value, char *string, int size, char *format);
|
||||
inline char *Strncpy(char *to, const char *from, size_t size);
|
||||
int Gethostbyname(char *addr, struct hostent *host);
|
||||
|
||||
+int sockaddr_family_supported(const struct sockaddr_storage *ss);
|
||||
char *sockaddr_print_addr(const struct sockaddr_storage *, char *, size_t);
|
||||
#define SOCKADDR_PRINT_ADDR_LEN INET6_ADDRSTRLEN
|
||||
uint16_t sockaddr_get_port(const struct sockaddr_storage *);
|
||||
diff --git a/tftpd.c b/tftpd.c
|
||||
index 0b6f6a5..a7561a5 100644
|
||||
--- a/tftpd.c
|
||||
+++ b/tftpd.c
|
||||
@@ -644,6 +644,11 @@ void *tftpd_receive_request(void *arg)
|
||||
}
|
||||
|
||||
#ifdef HAVE_WRAP
|
||||
+ if (!abort && !sockaddr_family_supported(&data->client_info->client))
|
||||
+ {
|
||||
+ logger(LOG_ERR, "Connection from unsupported network address family refused");
|
||||
+ abort = 1;
|
||||
+ }
|
||||
if (!abort)
|
||||
{
|
||||
/* Verify the client has access. We don't look for the name but
|
||||
diff --git a/tftpd_mtftp.c b/tftpd_mtftp.c
|
||||
index d420d10..0032905 100644
|
||||
--- a/tftpd_mtftp.c
|
||||
+++ b/tftpd_mtftp.c
|
||||
@@ -393,6 +393,11 @@ void *tftpd_mtftp_server(void *arg)
|
||||
&data_size, data->data_buffer);
|
||||
|
||||
#ifdef HAVE_WRAP
|
||||
+ if (!sockaddr_family_supported(&sa))
|
||||
+ {
|
||||
+ logger(LOG_ERR, "mtftp: Connection from unsupported network address family refused");
|
||||
+ continue;
|
||||
+ }
|
||||
/* Verify the client has access. We don't look for the name but
|
||||
rely only on the IP address for that. */
|
||||
sockaddr_print_addr(&sa, addr_str, sizeof(addr_str));
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -18,6 +18,9 @@ ATFTP_LIBS = -lpthread
|
||||
ATFTP_CONF_ENV = LIBS="$(ATFTP_LIBS)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -fgnu89-inline"
|
||||
|
||||
# 0004-Fix-for-DoS-issue-CVE-2020-6097.patch
|
||||
ATFTP_IGNORE_CVES += CVE-2020-6097
|
||||
|
||||
ifeq ($(BR2_PACKAGE_READLINE),y)
|
||||
ATFTP_DEPENDENCIES += readline
|
||||
ATFTP_CONF_OPTS += --enable-libreadline
|
||||
|
||||
@@ -5,6 +5,7 @@ config BR2_PACKAGE_AZMQ
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # boost-log
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
|
||||
depends on BR2_USE_WCHAR # boost
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
|
||||
select BR2_PACKAGE_ZEROMQ
|
||||
select BR2_PACKAGE_BOOST
|
||||
@@ -21,6 +22,7 @@ config BR2_PACKAGE_AZMQ
|
||||
https://github.com/zeromq/azmq
|
||||
|
||||
comment "azmq needs a toolchain w/ C++11, wchar and NPTL"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
|
||||
&& BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS_NPTL)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ config BR2_BINUTILS_VERSION_2_34_X
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
|
||||
config BR2_BINUTILS_VERSION_2_35_X
|
||||
bool "binutils 2.35.1"
|
||||
bool "binutils 2.35.2"
|
||||
depends on !BR2_csky
|
||||
# https://github.com/uclinux-dev/elf2flt/pull/16
|
||||
# https://github.com/uclinux-dev/elf2flt/issues/12
|
||||
@@ -55,7 +55,7 @@ config BR2_BINUTILS_VERSION
|
||||
default "2.32" if BR2_BINUTILS_VERSION_2_32_X
|
||||
default "2.33.1" if BR2_BINUTILS_VERSION_2_33_X
|
||||
default "2.34" if BR2_BINUTILS_VERSION_2_34_X
|
||||
default "2.35.1" if BR2_BINUTILS_VERSION_2_35_X
|
||||
default "2.35.2" if BR2_BINUTILS_VERSION_2_35_X
|
||||
|
||||
config BR2_BINUTILS_ENABLE_LTO
|
||||
bool
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
sha512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a binutils-2.32.tar.xz
|
||||
sha512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac binutils-2.33.1.tar.xz
|
||||
sha512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd binutils-2.34.tar.xz
|
||||
sha512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz
|
||||
sha512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 binutils-2.35.2.tar.xz
|
||||
|
||||
# Locally calculated (fetched from Github)
|
||||
sha512 76a8227a19218435319c660e4983ea17985194b7f496f163e97543e7f6fd3e9249241fdc05a16ba512fba96a1d846c1f7b080983404d821d6215f10e7f11e238 binutils-gdb-arc-2020.09-release.tar.gz
|
||||
|
||||
@@ -10,6 +10,7 @@ config BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
|
||||
config BR2_PACKAGE_BITCOIN
|
||||
bool "bitcoin"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
|
||||
depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # boost
|
||||
@@ -37,6 +38,7 @@ config BR2_PACKAGE_BITCOIN
|
||||
|
||||
comment "bitcoin needs a toolchain w/ C++, threads, wchar"
|
||||
depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ config BR2_PACKAGE_BOOST_LAYOUT
|
||||
|
||||
config BR2_PACKAGE_BOOST_ATOMIC
|
||||
bool "boost-atomic"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
help
|
||||
C++11-style atomic<>.
|
||||
|
||||
@@ -82,6 +83,8 @@ config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
config BR2_PACKAGE_BOOST_CONTEXT
|
||||
bool "boost-context"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6 # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
select BR2_PACKAGE_BOOST_THREAD if !BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
help
|
||||
@@ -101,6 +104,7 @@ comment "boost-contract needs a toolchain w/ NPTL"
|
||||
config BR2_PACKAGE_BOOST_COROUTINE
|
||||
bool "boost-coroutine"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context, boost-thread
|
||||
select BR2_PACKAGE_BOOST_CHRONO
|
||||
select BR2_PACKAGE_BOOST_CONTEXT
|
||||
@@ -113,6 +117,7 @@ config BR2_PACKAGE_BOOST_COROUTINE
|
||||
|
||||
comment "boost-coroutine needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
|
||||
config BR2_PACKAGE_BOOST_DATE_TIME
|
||||
@@ -135,6 +140,8 @@ config BR2_PACKAGE_BOOST_FIBER
|
||||
# mips support uses the "pause" instruction, only available
|
||||
# since mips32r2/mips64r2.
|
||||
depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6 # boost-context -> boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
|
||||
select BR2_PACKAGE_BOOST_CONTEXT
|
||||
select BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
@@ -144,10 +151,14 @@ config BR2_PACKAGE_BOOST_FIBER
|
||||
|
||||
comment "boost-fiber needs a toolchain w/ NPTL"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
|
||||
comment "boost-fiber needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
|
||||
config BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
@@ -190,6 +201,8 @@ config BR2_PACKAGE_BOOST_LOCALE
|
||||
# details.
|
||||
depends on !(BR2_STATIC_LIBS && BR2_PACKAGE_ICU)
|
||||
depends on !(BR2_TOOLCHAIN_HAS_GCC_BUG_64735 && BR2_PACKAGE_ICU) # boost-thread
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| !BR2_PACKAGE_ICU # boost-thread
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
select BR2_PACKAGE_BOOST_THREAD if BR2_PACKAGE_ICU
|
||||
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
|
||||
@@ -197,16 +210,19 @@ config BR2_PACKAGE_BOOST_LOCALE
|
||||
Provide localization and Unicode handling tools for C++.
|
||||
|
||||
comment "boost-locale needs a toolchain w/ dynamic library"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on BR2_PACKAGE_ICU
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
comment "boost-locale needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on BR2_PACKAGE_ICU
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
|
||||
config BR2_PACKAGE_BOOST_LOG
|
||||
bool "boost-log"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
select BR2_PACKAGE_BOOST_ATOMIC
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
@@ -218,6 +234,7 @@ config BR2_PACKAGE_BOOST_LOG
|
||||
Logging library.
|
||||
|
||||
comment "boost-log needs a toolchain w/ NPTL"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
|
||||
comment "boost-log needs a toolchain not affected by GCC bug 64735"
|
||||
@@ -313,8 +330,8 @@ config BR2_PACKAGE_BOOST_TEST
|
||||
|
||||
config BR2_PACKAGE_BOOST_THREAD
|
||||
bool "boost-thread"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception
|
||||
select BR2_PACKAGE_BOOST_ATOMIC if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
select BR2_PACKAGE_BOOST_CHRONO
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
help
|
||||
@@ -332,6 +349,7 @@ config BR2_PACKAGE_BOOST_TIMER
|
||||
|
||||
config BR2_PACKAGE_BOOST_TYPE_ERASURE
|
||||
bool "boost-type_erasure"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
select BR2_PACKAGE_BOOST_THREAD
|
||||
@@ -346,6 +364,7 @@ config BR2_PACKAGE_BOOST_WAVE
|
||||
# limitation of assembler for coldfire
|
||||
# error: Tried to convert PC relative branch to absolute jump
|
||||
depends on !BR2_m68k_cf
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
select BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
|
||||
@@ -96,6 +96,13 @@ else
|
||||
BRLTTY_CONF_OPTS += --without-rgx-package
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_POLKIT),y)
|
||||
BRLTTY_DEPENDENCIES += polkit
|
||||
BRLTTY_CONF_OPTS += --enable-polkit
|
||||
else
|
||||
BRLTTY_CONF_OPTS += --disable-polkit
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
BRLTTY_DEPENDENCIES += systemd
|
||||
BRLTTY_CONF_OPTS += --with-service-package
|
||||
|
||||
@@ -18,7 +18,7 @@ fi
|
||||
wait_for_ipv6_default_route() {
|
||||
printf "Waiting for IPv6 default route to appear"
|
||||
while [ $IF_WAIT_DELAY -gt 0 ]; do
|
||||
if [ -z "$(ip -6 route list | grep default)" ]; then
|
||||
if ip -6 route list | grep -q default; then
|
||||
printf "\n"
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From f27c12d491955c94583512603bf32c4568f20929 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Walz <code@serpedon.de>
|
||||
Date: Tue, 2 Feb 2021 00:50:29 +0100
|
||||
Subject: [PATCH] Store a copy of each serialized shared_ptr within the archive
|
||||
to prevent the shared_ptr to be freed to early. (#667)
|
||||
|
||||
The archives use the memory address pointed by the shared_ptr as a
|
||||
unique id which must not be reused during lifetime of the archive.
|
||||
Therefore, the archives stores a copy of it.
|
||||
This problem was also reported as CVE-2020-11105.
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/USCiLab/cereal/commit/f27c12d491955c94583512603bf32c4568f20929]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
include/cereal/cereal.hpp | 13 +++++++++++--
|
||||
include/cereal/types/memory.hpp | 2 +-
|
||||
2 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/cereal/cereal.hpp b/include/cereal/cereal.hpp
|
||||
index 99bed9d6..f0d15e8b 100644
|
||||
--- a/include/cereal/cereal.hpp
|
||||
+++ b/include/cereal/cereal.hpp
|
||||
@@ -369,12 +369,17 @@ namespace cereal
|
||||
point to the same data.
|
||||
|
||||
@internal
|
||||
- @param addr The address (see shared_ptr get()) pointed to by the shared pointer
|
||||
+ @param sharedPointer The shared pointer itself (the adress is taked via get()).
|
||||
+ The archive takes a copy to prevent the memory location to be freed
|
||||
+ as long as the address is used as id. This is needed to prevent CVE-2020-11105.
|
||||
@return A key that uniquely identifies the pointer */
|
||||
- inline std::uint32_t registerSharedPointer( void const * addr )
|
||||
+ inline std::uint32_t registerSharedPointer(const std::shared_ptr<const void>& sharedPointer)
|
||||
{
|
||||
+ void const * addr = sharedPointer.get();
|
||||
+
|
||||
// Handle null pointers by just returning 0
|
||||
if(addr == 0) return 0;
|
||||
+ itsSharedPointerStorage.push_back(sharedPointer);
|
||||
|
||||
auto id = itsSharedPointerMap.find( addr );
|
||||
if( id == itsSharedPointerMap.end() )
|
||||
@@ -645,6 +650,10 @@ namespace cereal
|
||||
//! Maps from addresses to pointer ids
|
||||
std::unordered_map<void const *, std::uint32_t> itsSharedPointerMap;
|
||||
|
||||
+ //! Copy of shared pointers used in #itsSharedPointerMap to make sure they are kept alive
|
||||
+ // during lifetime of itsSharedPointerMap to prevent CVE-2020-11105.
|
||||
+ std::vector<std::shared_ptr<const void>> itsSharedPointerStorage;
|
||||
+
|
||||
//! The id to be given to the next pointer
|
||||
std::uint32_t itsCurrentPointerId;
|
||||
|
||||
diff --git a/include/cereal/types/memory.hpp b/include/cereal/types/memory.hpp
|
||||
index 59e9da9b..cac1f334 100644
|
||||
--- a/include/cereal/types/memory.hpp
|
||||
+++ b/include/cereal/types/memory.hpp
|
||||
@@ -263,7 +263,7 @@ namespace cereal
|
||||
{
|
||||
auto & ptr = wrapper.ptr;
|
||||
|
||||
- uint32_t id = ar.registerSharedPointer( ptr.get() );
|
||||
+ uint32_t id = ar.registerSharedPointer( ptr );
|
||||
ar( CEREAL_NVP_("id", id) );
|
||||
|
||||
if( id & detail::msb_32bit )
|
||||
@@ -15,4 +15,7 @@ CEREAL_CONF_OPTS = \
|
||||
-DTHREAD_SAFE=ON \
|
||||
-DJUST_INSTALL_CEREAL=ON
|
||||
|
||||
# 0001-Store-a-copy-of-each-serialized-shared_ptr-within-the-archive.patch
|
||||
CEREAL_IGNORE_CVES += CVE-2020-11105
|
||||
|
||||
$(eval $(cmake-package))
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 8079d8fd39131fcfaec33f1c7799412bcf8e051e25b10bd6e37fc16159417aa1 chartjs-v2.9.3.tar.gz
|
||||
sha256 9ef3697e279a585c79730f35dba16ad4e24ddeed49a150adb341c31f191fb78e chartjs-2.9.4.tar.gz
|
||||
sha256 7b43caae91f31b18dc81fae6e0f7aa1acbecaa6d84e3249905cbe15308307d67 LICENSE.md
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CHARTJS_VERSION = v2.9.3
|
||||
CHARTJS_SITE = $(call github,chartjs,Chart.js,$(CHARTJS_VERSION))
|
||||
CHARTJS_VERSION = 2.9.4
|
||||
CHARTJS_SITE = $(call github,chartjs,Chart.js,v$(CHARTJS_VERSION))
|
||||
CHARTJS_LICENSE = MIT
|
||||
CHARTJS_LICENSE_FILES = LICENSE.md
|
||||
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
From 58d397ba74873384aee449690a9070bacd5676fa Mon Sep 17 00:00:00 2001
|
||||
From: Colin Wee <cwee@tesla.com>
|
||||
Date: Thu, 28 Jan 2021 19:39:14 +0100
|
||||
Subject: [PATCH] gdhcp: Avoid reading invalid data in dhcp_get_option
|
||||
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
gdhcp/client.c | 20 +++++++++++---------
|
||||
gdhcp/common.c | 24 +++++++++++++++++++-----
|
||||
gdhcp/common.h | 2 +-
|
||||
gdhcp/server.c | 12 +++++++-----
|
||||
4 files changed, 38 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
||||
index 09dfe5ec..6a5613e7 100644
|
||||
--- a/gdhcp/client.c
|
||||
+++ b/gdhcp/client.c
|
||||
@@ -1629,12 +1629,12 @@ static void start_request(GDHCPClient *dhcp_client)
|
||||
NULL);
|
||||
}
|
||||
|
||||
-static uint32_t get_lease(struct dhcp_packet *packet)
|
||||
+static uint32_t get_lease(struct dhcp_packet *packet, uint16_t packet_len)
|
||||
{
|
||||
uint8_t *option;
|
||||
uint32_t lease_seconds;
|
||||
|
||||
- option = dhcp_get_option(packet, DHCP_LEASE_TIME);
|
||||
+ option = dhcp_get_option(packet, packet_len, DHCP_LEASE_TIME);
|
||||
if (!option)
|
||||
return 3600;
|
||||
|
||||
@@ -2226,7 +2226,8 @@ static void get_dhcpv6_request(GDHCPClient *dhcp_client,
|
||||
}
|
||||
}
|
||||
|
||||
-static void get_request(GDHCPClient *dhcp_client, struct dhcp_packet *packet)
|
||||
+static void get_request(GDHCPClient *dhcp_client, struct dhcp_packet *packet,
|
||||
+ uint16_t packet_len)
|
||||
{
|
||||
GDHCPOptionType type;
|
||||
GList *list, *value_list;
|
||||
@@ -2237,7 +2238,7 @@ static void get_request(GDHCPClient *dhcp_client, struct dhcp_packet *packet)
|
||||
for (list = dhcp_client->request_list; list; list = list->next) {
|
||||
code = (uint8_t) GPOINTER_TO_INT(list->data);
|
||||
|
||||
- option = dhcp_get_option(packet, code);
|
||||
+ option = dhcp_get_option(packet, packet_len, code);
|
||||
if (!option) {
|
||||
g_hash_table_remove(dhcp_client->code_value_hash,
|
||||
GINT_TO_POINTER((int) code));
|
||||
@@ -2297,6 +2298,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
re = dhcp_recv_l2_packet(&packet,
|
||||
dhcp_client->listener_sockfd,
|
||||
&dst_addr);
|
||||
+ pkt_len = (uint16_t)(unsigned int)re;
|
||||
xid = packet.xid;
|
||||
} else if (dhcp_client->listen_mode == L3) {
|
||||
if (dhcp_client->type == G_DHCP_IPV6) {
|
||||
@@ -2361,7 +2363,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
dhcp_client->status_code = status;
|
||||
}
|
||||
} else {
|
||||
- message_type = dhcp_get_option(&packet, DHCP_MESSAGE_TYPE);
|
||||
+ message_type = dhcp_get_option(&packet, pkt_len, DHCP_MESSAGE_TYPE);
|
||||
if (!message_type)
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2378,7 +2380,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
dhcp_client->timeout = 0;
|
||||
dhcp_client->retry_times = 0;
|
||||
|
||||
- option = dhcp_get_option(&packet, DHCP_SERVER_ID);
|
||||
+ option = dhcp_get_option(&packet, pkt_len, DHCP_SERVER_ID);
|
||||
dhcp_client->server_ip = get_be32(option);
|
||||
dhcp_client->requested_ip = ntohl(packet.yiaddr);
|
||||
|
||||
@@ -2428,9 +2430,9 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
|
||||
remove_timeouts(dhcp_client);
|
||||
|
||||
- dhcp_client->lease_seconds = get_lease(&packet);
|
||||
+ dhcp_client->lease_seconds = get_lease(&packet, pkt_len);
|
||||
|
||||
- get_request(dhcp_client, &packet);
|
||||
+ get_request(dhcp_client, &packet, pkt_len);
|
||||
|
||||
switch_listening_mode(dhcp_client, L_NONE);
|
||||
|
||||
@@ -2438,7 +2440,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
dhcp_client->assigned_ip = get_ip(packet.yiaddr);
|
||||
|
||||
if (dhcp_client->state == REBOOTING) {
|
||||
- option = dhcp_get_option(&packet,
|
||||
+ option = dhcp_get_option(&packet, pkt_len,
|
||||
DHCP_SERVER_ID);
|
||||
dhcp_client->server_ip = get_be32(option);
|
||||
}
|
||||
diff --git a/gdhcp/common.c b/gdhcp/common.c
|
||||
index 1d667d17..c8916aa8 100644
|
||||
--- a/gdhcp/common.c
|
||||
+++ b/gdhcp/common.c
|
||||
@@ -73,18 +73,21 @@ GDHCPOptionType dhcp_get_code_type(uint8_t code)
|
||||
return OPTION_UNKNOWN;
|
||||
}
|
||||
|
||||
-uint8_t *dhcp_get_option(struct dhcp_packet *packet, int code)
|
||||
+uint8_t *dhcp_get_option(struct dhcp_packet *packet, uint16_t packet_len, int code)
|
||||
{
|
||||
int len, rem;
|
||||
- uint8_t *optionptr;
|
||||
+ uint8_t *optionptr, *options_end;
|
||||
+ size_t options_len;
|
||||
uint8_t overload = 0;
|
||||
|
||||
/* option bytes: [code][len][data1][data2]..[dataLEN] */
|
||||
optionptr = packet->options;
|
||||
rem = sizeof(packet->options);
|
||||
+ options_len = packet_len - (sizeof(*packet) - sizeof(packet->options));
|
||||
+ options_end = optionptr + options_len - 1;
|
||||
|
||||
while (1) {
|
||||
- if (rem <= 0)
|
||||
+ if ((rem <= 0) && (optionptr + OPT_CODE > options_end))
|
||||
/* Bad packet, malformed option field */
|
||||
return NULL;
|
||||
|
||||
@@ -115,14 +118,25 @@ uint8_t *dhcp_get_option(struct dhcp_packet *packet, int code)
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (optionptr + OPT_LEN > options_end) {
|
||||
+ /* bad packet, would read length field from OOB */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
len = 2 + optionptr[OPT_LEN];
|
||||
|
||||
rem -= len;
|
||||
if (rem < 0)
|
||||
continue; /* complain and return NULL */
|
||||
|
||||
- if (optionptr[OPT_CODE] == code)
|
||||
- return optionptr + OPT_DATA;
|
||||
+ if (optionptr[OPT_CODE] == code) {
|
||||
+ if (optionptr + len > options_end) {
|
||||
+ /* bad packet, option length points OOB */
|
||||
+ return NULL;
|
||||
+ } else {
|
||||
+ return optionptr + OPT_DATA;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (optionptr[OPT_CODE] == DHCP_OPTION_OVERLOAD)
|
||||
overload |= optionptr[OPT_DATA];
|
||||
diff --git a/gdhcp/common.h b/gdhcp/common.h
|
||||
index 9660231c..8f63fd75 100644
|
||||
--- a/gdhcp/common.h
|
||||
+++ b/gdhcp/common.h
|
||||
@@ -179,7 +179,7 @@ struct in6_pktinfo {
|
||||
};
|
||||
#endif
|
||||
|
||||
-uint8_t *dhcp_get_option(struct dhcp_packet *packet, int code);
|
||||
+uint8_t *dhcp_get_option(struct dhcp_packet *packet, uint16_t packet_len, int code);
|
||||
uint8_t *dhcpv6_get_option(struct dhcpv6_packet *packet, uint16_t pkt_len,
|
||||
int code, uint16_t *option_len, int *option_count);
|
||||
uint8_t *dhcpv6_get_sub_option(unsigned char *option, uint16_t max_len,
|
||||
diff --git a/gdhcp/server.c b/gdhcp/server.c
|
||||
index 85405f19..52ea2a55 100644
|
||||
--- a/gdhcp/server.c
|
||||
+++ b/gdhcp/server.c
|
||||
@@ -413,7 +413,7 @@ error:
|
||||
}
|
||||
|
||||
|
||||
-static uint8_t check_packet_type(struct dhcp_packet *packet)
|
||||
+static uint8_t check_packet_type(struct dhcp_packet *packet, uint16_t packet_len)
|
||||
{
|
||||
uint8_t *type;
|
||||
|
||||
@@ -423,7 +423,7 @@ static uint8_t check_packet_type(struct dhcp_packet *packet)
|
||||
if (packet->op != BOOTREQUEST)
|
||||
return 0;
|
||||
|
||||
- type = dhcp_get_option(packet, DHCP_MESSAGE_TYPE);
|
||||
+ type = dhcp_get_option(packet, packet_len, DHCP_MESSAGE_TYPE);
|
||||
|
||||
if (!type)
|
||||
return 0;
|
||||
@@ -651,6 +651,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
struct dhcp_lease *lease;
|
||||
uint32_t requested_nip = 0;
|
||||
uint8_t type, *server_id_option, *request_ip_option;
|
||||
+ uint16_t packet_len;
|
||||
int re;
|
||||
|
||||
if (condition & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) {
|
||||
@@ -661,12 +662,13 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
re = dhcp_recv_l3_packet(&packet, dhcp_server->listener_sockfd);
|
||||
if (re < 0)
|
||||
return TRUE;
|
||||
+ packet_len = (uint16_t)(unsigned int)re;
|
||||
|
||||
- type = check_packet_type(&packet);
|
||||
+ type = check_packet_type(&packet, packet_len);
|
||||
if (type == 0)
|
||||
return TRUE;
|
||||
|
||||
- server_id_option = dhcp_get_option(&packet, DHCP_SERVER_ID);
|
||||
+ server_id_option = dhcp_get_option(&packet, packet_len, DHCP_SERVER_ID);
|
||||
if (server_id_option) {
|
||||
uint32_t server_nid =
|
||||
get_unaligned((const uint32_t *) server_id_option);
|
||||
@@ -675,7 +677,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- request_ip_option = dhcp_get_option(&packet, DHCP_REQUESTED_IP);
|
||||
+ request_ip_option = dhcp_get_option(&packet, packet_len, DHCP_REQUESTED_IP);
|
||||
if (request_ip_option)
|
||||
requested_nip = get_be32(request_ip_option);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Wee <cwee@tesla.com>
|
||||
Date: Thu, 28 Jan 2021 19:41:09 +0100
|
||||
Subject: [PATCH] gdhcp: Avoid leaking stack data via unitiialized variable
|
||||
|
||||
Fixes: CVE-2021-26676
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
gdhcp/client.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
||||
index 6a5613e7..c7b85e58 100644
|
||||
--- a/gdhcp/client.c
|
||||
+++ b/gdhcp/client.c
|
||||
@@ -2270,7 +2270,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
||||
{
|
||||
GDHCPClient *dhcp_client = user_data;
|
||||
struct sockaddr_in dst_addr = { 0 };
|
||||
- struct dhcp_packet packet;
|
||||
+ struct dhcp_packet packet = { 0 };
|
||||
struct dhcpv6_packet *packet6 = NULL;
|
||||
uint8_t *message_type = NULL, *client_id = NULL, *option,
|
||||
*server_id = NULL;
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
From e4079a20f617a4b076af503f6e4e8b0304c9f2cb Mon Sep 17 00:00:00 2001
|
||||
From: Colin Wee <cwee@tesla.com>
|
||||
Date: Thu, 28 Jan 2021 19:41:53 +0100
|
||||
Subject: [PATCH] dnsproxy: Add length checks to prevent buffer overflow
|
||||
|
||||
Fixes: CVE-2021-26675
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
src/dnsproxy.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
|
||||
index a7bf87a1..4f5c897f 100644
|
||||
--- a/src/dnsproxy.c
|
||||
+++ b/src/dnsproxy.c
|
||||
@@ -1767,6 +1767,7 @@ static char *uncompress(int16_t field_count, char *start, char *end,
|
||||
char **uncompressed_ptr)
|
||||
{
|
||||
char *uptr = *uncompressed_ptr; /* position in result buffer */
|
||||
+ char * const uncomp_end = uncompressed + uncomp_len - 1;
|
||||
|
||||
debug("count %d ptr %p end %p uptr %p", field_count, ptr, end, uptr);
|
||||
|
||||
@@ -1787,12 +1788,15 @@ static char *uncompress(int16_t field_count, char *start, char *end,
|
||||
* tmp buffer.
|
||||
*/
|
||||
|
||||
- ulen = strlen(name);
|
||||
- strncpy(uptr, name, uncomp_len - (uptr - uncompressed));
|
||||
-
|
||||
debug("pos %d ulen %d left %d name %s", pos, ulen,
|
||||
(int)(uncomp_len - (uptr - uncompressed)), uptr);
|
||||
|
||||
+ ulen = strlen(name);
|
||||
+ if ((uptr + ulen + 1) > uncomp_end) {
|
||||
+ goto out;
|
||||
+ }
|
||||
+ strncpy(uptr, name, uncomp_len - (uptr - uncompressed));
|
||||
+
|
||||
uptr += ulen;
|
||||
*uptr++ = '\0';
|
||||
|
||||
@@ -1802,6 +1806,10 @@ static char *uncompress(int16_t field_count, char *start, char *end,
|
||||
* We copy also the fixed portion of the result (type, class,
|
||||
* ttl, address length and the address)
|
||||
*/
|
||||
+ if ((uptr + NS_RRFIXEDSZ) > uncomp_end) {
|
||||
+ debug("uncompressed data too large for buffer");
|
||||
+ goto out;
|
||||
+ }
|
||||
memcpy(uptr, ptr, NS_RRFIXEDSZ);
|
||||
|
||||
dns_type = uptr[0] << 8 | uptr[1];
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -7,7 +7,7 @@ config BR2_PACKAGE_DBUS
|
||||
help
|
||||
The D-Bus message bus system.
|
||||
|
||||
http://www.freedesktop.org/wiki/Software/dbus
|
||||
https://www.freedesktop.org/wiki/Software/dbus
|
||||
|
||||
comment "dbus needs a toolchain w/ threads"
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
# https://dbus.freedesktop.org/releases/dbus/dbus-1.12.18.tar.gz.asc
|
||||
# https://dbus.freedesktop.org/releases/dbus/dbus-1.12.20.tar.gz.asc
|
||||
# using key 36EC5A6448A4F5EF79BEFE98E05AE1478F814C4F
|
||||
sha256 64cf4d70840230e5e9bc784d153880775ab3db19d656ead8a0cb9c0ab5a95306 dbus-1.12.18.tar.gz
|
||||
sha256 f77620140ecb4cdc67f37fb444f8a6bea70b5b6461f12f1cbe2cec60fa7de5fe dbus-1.12.20.tar.gz
|
||||
|
||||
# Locally calculated
|
||||
sha256 0e46f54efb12d04ab5c33713bacd0e140c9a35b57ae29e03c853203266e8f3a1 COPYING
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DBUS_VERSION = 1.12.18
|
||||
DBUS_VERSION = 1.12.20
|
||||
DBUS_SITE = https://dbus.freedesktop.org/releases/dbus
|
||||
DBUS_LICENSE = AFL-2.1 or GPL-2.0+ (library, tools), GPL-2.0+ (tools)
|
||||
DBUS_LICENSE_FILES = COPYING
|
||||
|
||||
@@ -41,6 +41,7 @@ endef
|
||||
|
||||
define DHCPCD_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
|
||||
mkdir -p $(TARGET_DIR)/var/db/dhcpcd
|
||||
endef
|
||||
|
||||
# When network-manager is enabled together with dhcpcd, it will use
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
# http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.81.tar.xz.asc
|
||||
sha256 749ca903537c5197c26444ac24b0dce242cf42595fdfe6b9a5b9e4c7ad32f8fb dnsmasq-2.81.tar.xz
|
||||
# https://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.83.tar.xz.asc
|
||||
sha256 603195c64b73137609b07e1024ae0b37f652b2f5fe467dce66985b3d1850050c dnsmasq-2.84.tar.xz
|
||||
# Locally calculated
|
||||
sha256 dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa COPYING
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING-v3
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DNSMASQ_VERSION = 2.81
|
||||
DNSMASQ_VERSION = 2.84
|
||||
DNSMASQ_SOURCE = dnsmasq-$(DNSMASQ_VERSION).tar.xz
|
||||
DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq
|
||||
DNSMASQ_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
|
||||
@@ -77,13 +77,7 @@ DNSMASQ_DEPENDENCIES += ubus
|
||||
DNSMASQ_COPTS += -DHAVE_UBUS
|
||||
endif
|
||||
|
||||
define DNSMASQ_FIX_PKGCONFIG
|
||||
$(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \
|
||||
$(DNSMASQ_DIR)/Makefile
|
||||
endef
|
||||
|
||||
define DNSMASQ_BUILD_CMDS
|
||||
$(DNSMASQ_FIX_PKGCONFIG)
|
||||
$(DNSMASQ_TWEAK_LIBLUA)
|
||||
$(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPTS) all$(DNSMASQ_I18N)
|
||||
endef
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 21b88a00e8f7a3194c0ae1de5a31e3e1728ef6aa2804158dcb502a8b5fd6ae2b docker-cli-19.03.13.tar.gz
|
||||
sha256 1b577057daf269fabab93b7035d1685aa690118ca7c84e1d772a770a021da883 docker-cli-19.03.15.tar.gz
|
||||
sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DOCKER_CLI_VERSION = 19.03.13
|
||||
DOCKER_CLI_VERSION = 19.03.15
|
||||
DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION))
|
||||
|
||||
DOCKER_CLI_LICENSE = Apache-2.0
|
||||
|
||||
@@ -12,7 +12,7 @@ DOCKER_CONTAINERD_LICENSE_FILES = LICENSE
|
||||
DOCKER_CONTAINERD_GOMOD = github.com/containerd/containerd
|
||||
|
||||
DOCKER_CONTAINERD_LDFLAGS = \
|
||||
-X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION)
|
||||
-X $(DOCKER_CONTAINERD_GOMOD)/version.Version=$(DOCKER_CONTAINERD_VERSION)
|
||||
|
||||
DOCKER_CONTAINERD_BUILD_TARGETS = cmd/ctr cmd/containerd cmd/containerd-shim
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 f43331fef1d24e31f43392fc1fed72b48fc17fd432d341d6eb1f68ca11383406 docker-engine-19.03.13.tar.gz
|
||||
sha256 ef5cd0bdd3e06102dcdae72ffba7f89e663c680d9dc17b811f51aad8ff5b0405 docker-engine-19.03.15.tar.gz
|
||||
sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DOCKER_ENGINE_VERSION = 19.03.13
|
||||
DOCKER_ENGINE_VERSION = 19.03.15
|
||||
DOCKER_ENGINE_SITE = $(call github,moby,moby,v$(DOCKER_ENGINE_VERSION))
|
||||
|
||||
DOCKER_ENGINE_LICENSE = Apache-2.0
|
||||
|
||||
@@ -8,6 +8,7 @@ config BR2_PACKAGE_DOMOTICZ
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_PACKAGE_LUA_5_3
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
|
||||
select BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
@@ -30,6 +31,7 @@ config BR2_PACKAGE_DOMOTICZ
|
||||
|
||||
comment "domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 4.8, NPTL, wchar, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed after checking signature
|
||||
sha256 0b972a441f680545ddfacd2f41fb2a705fb03249d46ed5ce7e01fe68b6cfb5f0 dovecot-2.3-pigeonhole-0.5.11.tar.gz
|
||||
sha256 911fe566da5b638eab1b11105314300bc9049cc3832d4bd2aed44c265013bf17 dovecot-2.3-pigeonhole-0.5.13.tar.gz
|
||||
sha256 fc9e9522216f2a9a28b31300e3c73c1df56acc27dfae951bf516e7995366b51a COPYING
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DOVECOT_PIGEONHOLE_VERSION = 0.5.11
|
||||
DOVECOT_PIGEONHOLE_VERSION = 0.5.13
|
||||
DOVECOT_PIGEONHOLE_SOURCE = dovecot-2.3-pigeonhole-$(DOVECOT_PIGEONHOLE_VERSION).tar.gz
|
||||
DOVECOT_PIGEONHOLE_SITE = https://pigeonhole.dovecot.org/releases/2.3
|
||||
DOVECOT_PIGEONHOLE_LICENSE = LGPL-2.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Locally computed after checking signature
|
||||
sha256 d3d9ea9010277f57eb5b9f4166a5d2ba539b172bd6d5a2b2529a6db524baafdc dovecot-2.3.11.3.tar.gz
|
||||
sha256 a363b132e494f662d98c820d1481297e6ae72f194c2c91b6c39e1518b86240a8 COPYING
|
||||
sha256 a3f875b80ec11a452480690108660030978c94fa8e796ad6d943a874b496f1c4 dovecot-2.3.13.tar.gz
|
||||
sha256 319a9830aab406109cd67cb45496587566a8123203d66d037b209ca3e13de02a COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPL
|
||||
sha256 52b8c95fabb19575281874b661ef7968ea47e8f5d74ba0dd40ce512e52b3fc97 COPYING.MIT
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
################################################################################
|
||||
|
||||
DOVECOT_VERSION_MAJOR = 2.3
|
||||
DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).11.3
|
||||
DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).13
|
||||
DOVECOT_SITE = https://dovecot.org/releases/$(DOVECOT_VERSION_MAJOR)
|
||||
DOVECOT_INSTALL_STAGING = YES
|
||||
DOVECOT_LICENSE = LGPL-2.1, MIT, Public Domain, BSD-3-Clause, Unicode-DFS-2015
|
||||
|
||||
@@ -31,4 +31,11 @@ endef
|
||||
EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_REMOVE_UTILS_RESTORE
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),)
|
||||
define EBTABLES_INSTALL_LEGACY_SYMLINK
|
||||
ln -sf /usr/sbin/ebtables-legacy $(TARGET_DIR)/sbin/ebtables
|
||||
endef
|
||||
EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_INSTALL_LEGACY_SYMLINK
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 03bc0ee07fb6e293d081ffd8af1654788b434f6a Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Date: Thu, 11 Feb 2021 20:59:25 -0800
|
||||
Subject: [PATCH] libfakeroot.c: define _STAT_VER if not already defined
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
glibc 2.33 does does declare `_STAT_VER` anymore.
|
||||
|
||||
Based on patch from Jan Pazdziora:
|
||||
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/
|
||||
|
||||
Backported from: feda578ca3608b7fc9a28a3a91293611c0ef47b7
|
||||
|
||||
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
|
||||
---
|
||||
libfakeroot.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/libfakeroot.c b/libfakeroot.c
|
||||
index 3e80e38..14cdbc4 100644
|
||||
--- a/libfakeroot.c
|
||||
+++ b/libfakeroot.c
|
||||
@@ -90,6 +90,16 @@
|
||||
#define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
|
||||
#endif
|
||||
|
||||
+#ifndef _STAT_VER
|
||||
+ #if defined (__aarch64__)
|
||||
+ #define _STAT_VER 0
|
||||
+ #elif defined (__x86_64__)
|
||||
+ #define _STAT_VER 1
|
||||
+ #else
|
||||
+ #define _STAT_VER 3
|
||||
+ #endif
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
These INT_* (which stands for internal) macros should always be used when
|
||||
the fakeroot library owns the storage of the stat variable.
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
From feda578ca3608b7fc9a28a3a91293611c0ef47b7 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Date: Thu, 11 Feb 2021 21:00:04 -0800
|
||||
Subject: [PATCH] libfakeroot.c: add wrappers for new glibc 2.33+ symbols
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch add wrappers for newly exported symbols in glibc 2.33.
|
||||
|
||||
Backported from: feda578ca3608b7fc9a28a3a91293611c0ef47b7
|
||||
|
||||
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
|
||||
---
|
||||
libfakeroot.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 48 insertions(+)
|
||||
|
||||
diff --git a/libfakeroot.c b/libfakeroot.c
|
||||
index 14cdbc4..d75c51f 100644
|
||||
--- a/libfakeroot.c
|
||||
+++ b/libfakeroot.c
|
||||
@@ -1352,6 +1352,54 @@ int renameat(int olddir_fd, const char *oldpath,
|
||||
#endif /* HAVE_FSTATAT */
|
||||
|
||||
|
||||
+#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
|
||||
+/* Glibc 2.33 exports symbols for these functions in the shared lib */
|
||||
+ int lstat(const char *file_name, struct stat *statbuf) {
|
||||
+ return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf);
|
||||
+ }
|
||||
+ int stat(const char *file_name, struct stat *st) {
|
||||
+ return WRAP_STAT STAT_ARG(_STAT_VER, file_name, st);
|
||||
+ }
|
||||
+ int fstat(int fd, struct stat *st) {
|
||||
+ return WRAP_FSTAT FSTAT_ARG(_STAT_VER, fd, st);
|
||||
+ }
|
||||
+
|
||||
+ #ifdef HAVE_FSTATAT
|
||||
+ int fstatat(int dir_fd, const char *path, struct stat *st, int flags) {
|
||||
+ return WRAP_FSTATAT FSTATAT_ARG(_STAT_VER, dir_fd, path, st, flags);
|
||||
+ }
|
||||
+ #endif
|
||||
+
|
||||
+ #ifdef STAT64_SUPPORT
|
||||
+ int lstat64(const char *file_name, struct stat64 *st) {
|
||||
+ return WRAP_LSTAT64 LSTAT64_ARG(_STAT_VER, file_name, st);
|
||||
+ }
|
||||
+ int stat64(const char *file_name, struct stat64 *st) {
|
||||
+ return WRAP_STAT64 STAT64_ARG(_STAT_VER, file_name, st);
|
||||
+ }
|
||||
+ int fstat64(int fd, struct stat64 *st) {
|
||||
+ return WRAP_FSTAT64 FSTAT64_ARG(_STAT_VER, fd, st);
|
||||
+ }
|
||||
+
|
||||
+ #ifdef HAVE_FSTATAT
|
||||
+ int fstatat64(int dir_fd, const char *path, struct stat64 *st, int flags) {
|
||||
+ return WRAP_FSTATAT64 FSTATAT64_ARG(_STAT_VER, dir_fd, path, st, flags);
|
||||
+ }
|
||||
+ #endif
|
||||
+ #endif
|
||||
+
|
||||
+ int mknod(const char *pathname, mode_t mode, dev_t dev) {
|
||||
+ return WRAP_MKNOD MKNOD_ARG(_STAT_VER, pathname, mode, &dev);
|
||||
+ }
|
||||
+
|
||||
+ #if defined(HAVE_FSTATAT) && defined(HAVE_MKNODAT)
|
||||
+ int mknodat(int dir_fd, const char *pathname, mode_t mode, dev_t dev) {
|
||||
+ return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev);
|
||||
+ }
|
||||
+ #endif
|
||||
+#endif /* GLIBC_PREREQ */
|
||||
+
|
||||
+
|
||||
#ifdef FAKEROOT_FAKENET
|
||||
pid_t fork(void)
|
||||
{
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
From 432dd46e662772020306a2ce8b1be38321697e69 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Date: Sat, 13 Feb 2021 19:32:08 -0800
|
||||
Subject: [PATCH] configure.ac: fix __xmknod{,at} pointer argument
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Switch default to assume * and not the absence of *.
|
||||
|
||||
On glibc 2.33+, there is no definition for these functions in header
|
||||
files, so the compile test doesn't work. But, we can default to using
|
||||
the pointer (as is the case with newer glibc), and use the header file
|
||||
on older platforms to fail the test and use no pointer.
|
||||
|
||||
Backported from: c3eebec293e35b997bb46c22fb5a4e114afb5e7f
|
||||
|
||||
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
|
||||
---
|
||||
configure.ac | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 73415d2..d85566f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -183,13 +183,13 @@ AC_MSG_CHECKING([for type of arg of __xmknod])
|
||||
]], [[
|
||||
int __xmknod ( int ver,
|
||||
const char *pathname ,
|
||||
- mode_t mode , dev_t dev);
|
||||
+ mode_t mode , dev_t *dev);
|
||||
]])],[
|
||||
- AC_DEFINE(XMKNOD_FRTH_ARG,)
|
||||
- AC_MSG_RESULT([no extra *])
|
||||
- ],[
|
||||
AC_DEFINE(XMKNOD_FRTH_ARG,[*])
|
||||
AC_MSG_RESULT([needs *])
|
||||
+ ],[
|
||||
+ AC_DEFINE(XMKNOD_FRTH_ARG,)
|
||||
+ AC_MSG_RESULT([no extra *])
|
||||
|
||||
])
|
||||
|
||||
@@ -210,13 +210,13 @@ AC_MSG_CHECKING([for type of arg of __xmknodat])
|
||||
int __xmknodat ( int ver,
|
||||
int dirfd,
|
||||
const char *pathname ,
|
||||
- mode_t mode , dev_t dev);
|
||||
+ mode_t mode , dev_t *dev);
|
||||
]])],[
|
||||
- AC_DEFINE(XMKNODAT_FIFTH_ARG,)
|
||||
- AC_MSG_RESULT([no extra *])
|
||||
- ],[
|
||||
AC_DEFINE(XMKNODAT_FIFTH_ARG,[*])
|
||||
AC_MSG_RESULT([needs *])
|
||||
+ ],[
|
||||
+ AC_DEFINE(XMKNODAT_FIFTH_ARG,)
|
||||
+ AC_MSG_RESULT([no extra *])
|
||||
|
||||
])
|
||||
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -15,7 +15,7 @@ HOST_FAKEROOT_DEPENDENCIES = host-acl
|
||||
HOST_FAKEROOT_CONF_ENV = \
|
||||
ac_cv_header_sys_capability_h=no \
|
||||
ac_cv_func_capset=no
|
||||
# upstream does not ship with configure script anymore
|
||||
# patching configure.ac in patch 0003
|
||||
HOST_FAKEROOT_AUTORECONF = YES
|
||||
FAKEROOT_LICENSE = GPL-3.0+
|
||||
FAKEROOT_LICENSE_FILES = COPYING
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From da6b3b70cb852dd8e9f9e21aef95fa83e7f7ab0d Mon Sep 17 00:00:00 2001
|
||||
From: Pyry Kontio <pyry.kontio@drasa.eu>
|
||||
Date: Mon, 6 Jul 2020 12:57:35 +0900
|
||||
Subject: [PATCH] Makefile: Fix building on AArch64 NixOS
|
||||
|
||||
The parsing of the output of archtest.c produced an unexpected
|
||||
value on AArch64 NixOS. For example, the make variable ARCH was set to:
|
||||
|
||||
```
|
||||
bit outside of fd_set selected
|
||||
arm
|
||||
```
|
||||
|
||||
This made the arch and OS checks fail.
|
||||
|
||||
This commit simplifies the parsing, making it more robust.
|
||||
|
||||
The C files archtest.c, endiantest.c and os.h used to set the
|
||||
TARGET_OS, ARCH and ENDIAN variables, respectively, output
|
||||
the result of the test as the final line, so just extracting
|
||||
the final line and removing double quoting is enough.
|
||||
|
||||
This commit also fixes a bug with debug_shell lacking escaping
|
||||
single quotes, which prevented using the single quote in the
|
||||
debug_shell calls. It used to work by accident before this fix;
|
||||
the line in the call happened to contain a balanced pair of double
|
||||
quotes and lacked other characters that needed escaping, which
|
||||
didn't break the debug_shell, but this was accidental and very
|
||||
brittle.
|
||||
|
||||
Signed-off-by: Pyry Kontio <pyry.kontio@drasa.eu>
|
||||
Change-Id: Iaa4477a71e758cf9ecad2c22f3b77bc6508a3510
|
||||
Reviewed-on: https://review.coreboot.org/c/flashrom/+/43140
|
||||
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
|
||||
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/flashrom/flashrom/commit/da6b3b70cb852dd8e9f9e21aef95fa83e7f7ab0d]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
Makefile | 16 ++++++++++------
|
||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f3f7717e2..e475cbdbd 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -83,7 +83,8 @@ dummy_for_make_3_80:=$(shell printf "Build started on %s\n\n" "$$(date)" >$(BUIL
|
||||
|
||||
# Provide an easy way to execute a command, print its output to stdout and capture any error message on stderr
|
||||
# in the build details file together with the original stdout output.
|
||||
-debug_shell = $(shell export LC_ALL=C ; { echo 'exec: export LC_ALL=C ; { $(1) ; }' >&2; { $(1) ; } | tee -a $(BUILD_DETAILS_FILE) ; echo >&2 ; } 2>>$(BUILD_DETAILS_FILE))
|
||||
+debug_shell = $(shell export LC_ALL=C ; { echo 'exec: export LC_ALL=C ; { $(subst ','\'',$(1)) ; }' >&2; \
|
||||
+ { $(1) ; } | tee -a $(BUILD_DETAILS_FILE) ; echo >&2 ; } 2>>$(BUILD_DETAILS_FILE))
|
||||
|
||||
###############################################################################
|
||||
# General OS-specific settings.
|
||||
@@ -106,7 +107,8 @@ endif
|
||||
# IMPORTANT: The following line must be placed before TARGET_OS is ever used
|
||||
# (of course), but should come after any lines setting CC because the line
|
||||
# below uses CC itself.
|
||||
-override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"'))
|
||||
+override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null \
|
||||
+ | tail -1 | cut -f 2 -d'"'))
|
||||
|
||||
ifeq ($(TARGET_OS), Darwin)
|
||||
override CPPFLAGS += -I/opt/local/include -I/usr/local/include
|
||||
@@ -490,8 +492,10 @@ endif
|
||||
# IMPORTANT: The following line must be placed before ARCH is ever used
|
||||
# (of course), but should come after any lines setting CC because the line
|
||||
# below uses CC itself.
|
||||
-override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null | grep -v '^\#' | grep '"' | cut -f 2 -d'"'))
|
||||
-override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null | grep -v '^\#'))
|
||||
+override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null \
|
||||
+ | tail -1 | cut -f 2 -d'"'))
|
||||
+override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null \
|
||||
+ | tail -1))
|
||||
|
||||
# Disable the internal programmer on unsupported architectures (everything but x86 and mipsel)
|
||||
ifneq ($(ARCH)-little, $(filter $(ARCH),x86 mips)-$(ENDIAN))
|
||||
@@ -1299,12 +1303,12 @@ compiler: featuresavailable
|
||||
@printf "Target arch is "
|
||||
@# FreeBSD wc will output extraneous whitespace.
|
||||
@echo $(ARCH)|wc -w|grep -q '^[[:blank:]]*1[[:blank:]]*$$' || \
|
||||
- ( echo "unknown. Aborting."; exit 1)
|
||||
+ ( echo "unknown (\"$(ARCH)\"). Aborting."; exit 1)
|
||||
@printf "%s\n" '$(ARCH)'
|
||||
@printf "Target OS is "
|
||||
@# FreeBSD wc will output extraneous whitespace.
|
||||
@echo $(TARGET_OS)|wc -w|grep -q '^[[:blank:]]*1[[:blank:]]*$$' || \
|
||||
- ( echo "unknown. Aborting."; exit 1)
|
||||
+ ( echo "unknown (\"$(TARGET_OS)\"). Aborting."; exit 1)
|
||||
@printf "%s\n" '$(TARGET_OS)'
|
||||
ifeq ($(TARGET_OS), libpayload)
|
||||
@$(CC) --version 2>&1 | grep -q coreboot || \
|
||||
@@ -18,6 +18,8 @@ config BR2_PACKAGE_FIRMWARE_IMX_SDMA_FW_NAME
|
||||
default "imx51" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
|
||||
default "imx53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
|
||||
default "imx6q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
|
||||
default "imx6q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S
|
||||
default "imx6q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
|
||||
default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
|
||||
default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
|
||||
default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
|
||||
|
||||
@@ -116,9 +116,11 @@ endif
|
||||
FIRMWARE_IMX_VPU_FW_NAME = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_VPU_FW_NAME))
|
||||
ifneq ($(FIRMWARE_IMX_VPU_FW_NAME),)
|
||||
define FIRMWARE_IMX_INSTALL_TARGET_VPU_FW
|
||||
mkdir -p $(TARGET_DIR)/lib/firmware/imx/vpu
|
||||
cp $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin \
|
||||
$(TARGET_DIR)/lib/firmware/imx/vpu/
|
||||
mkdir -p $(TARGET_DIR)/lib/firmware/vpu
|
||||
for i in $$(find $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin); do \
|
||||
cp $$i $(TARGET_DIR)/lib/firmware/vpu/ ; \
|
||||
ln -sf vpu/$$(basename $$i) $(TARGET_DIR)/lib/firmware/$$(basename $$i) ; \
|
||||
done
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ config BR2_PACKAGE_FWTS
|
||||
depends on BR2_USE_MMU # libglib2
|
||||
depends on BR2_USE_WCHAR # libglib2, libbsd
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libbsd
|
||||
depends on !BR2_STATIC_LIBS # libbsd
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
select BR2_PACKAGE_LIBBSD
|
||||
@@ -31,9 +32,9 @@ comment "efi_runtime module needs a Linux kernel to be built"
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
endif
|
||||
|
||||
comment "fwts needs a glibc toolchain w/ wchar, threads"
|
||||
comment "fwts needs a glibc toolchain w/ wchar, threads, dynamic library"
|
||||
depends on BR2_i386 || BR2_x86_64 || BR2_aarch64
|
||||
depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS # libbsd
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_USES_GLIBC
|
||||
!BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
From 09944fba5bfb8e5543ce043c70d08222cf2f97ff Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Zissulescu <claziss@synopsys.com>
|
||||
Date: Wed, 11 Nov 2020 12:31:10 +0200
|
||||
Subject: [PATCH] arc: Refurbish adc/sbc patterns
|
||||
|
||||
The adc/sbc patterns were unecessary spliting, remove that and
|
||||
associated functions.
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
2020-10-11 Claudiu Zissulescu <claziss@synopsys.com>
|
||||
|
||||
* config/arc/arc-protos.h (arc_scheduling_not_expected): Remove
|
||||
it.
|
||||
(arc_sets_cc_p): Likewise.
|
||||
(arc_need_delay): Likewise.
|
||||
* config/arc/arc.c (arc_sets_cc_p): Likewise.
|
||||
(arc_need_delay): Likewise.
|
||||
(arc_scheduling_not_expected): Likewise.
|
||||
* config/arc/arc.md: Convert adc/sbc patterns to simple
|
||||
instruction definitions.
|
||||
|
||||
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
|
||||
Signed-off-by: Veronika Kremneva <kremneva@synopsys.com>
|
||||
---
|
||||
gcc/config/arc/arc-protos.h | 3 --
|
||||
gcc/config/arc/arc.c | 53 -------------------------
|
||||
gcc/config/arc/arc.md | 95 ++++++++++++++-------------------------------
|
||||
3 files changed, 29 insertions(+), 122 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
|
||||
index c72d78e3b9e..de4cf47c818 100644
|
||||
--- a/gcc/config/arc/arc-protos.h
|
||||
+++ b/gcc/config/arc/arc-protos.h
|
||||
@@ -90,10 +90,7 @@ extern void split_subsi (rtx *);
|
||||
extern void arc_split_move (rtx *);
|
||||
extern const char *arc_short_long (rtx_insn *insn, const char *, const char *);
|
||||
extern rtx arc_regno_use_in (unsigned int, rtx);
|
||||
-extern bool arc_scheduling_not_expected (void);
|
||||
-extern bool arc_sets_cc_p (rtx_insn *insn);
|
||||
extern int arc_label_align (rtx_insn *label);
|
||||
-extern bool arc_need_delay (rtx_insn *insn);
|
||||
extern bool arc_text_label (rtx_insn *insn);
|
||||
|
||||
extern bool arc_short_comparison_p (rtx, int);
|
||||
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
|
||||
index fcb83c4e23e..2daf83dd009 100644
|
||||
--- a/gcc/config/arc/arc.c
|
||||
+++ b/gcc/config/arc/arc.c
|
||||
@@ -10341,59 +10341,6 @@ arc_attr_type (rtx_insn *insn)
|
||||
return get_attr_type (insn);
|
||||
}
|
||||
|
||||
-/* Return true if insn sets the condition codes. */
|
||||
-
|
||||
-bool
|
||||
-arc_sets_cc_p (rtx_insn *insn)
|
||||
-{
|
||||
- if (NONJUMP_INSN_P (insn))
|
||||
- if (rtx_sequence *seq = dyn_cast <rtx_sequence *> (PATTERN (insn)))
|
||||
- insn = seq->insn (seq->len () - 1);
|
||||
- return arc_attr_type (insn) == TYPE_COMPARE;
|
||||
-}
|
||||
-
|
||||
-/* Return true if INSN is an instruction with a delay slot we may want
|
||||
- to fill. */
|
||||
-
|
||||
-bool
|
||||
-arc_need_delay (rtx_insn *insn)
|
||||
-{
|
||||
- rtx_insn *next;
|
||||
-
|
||||
- if (!flag_delayed_branch)
|
||||
- return false;
|
||||
- /* The return at the end of a function needs a delay slot. */
|
||||
- if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
|
||||
- && (!(next = next_active_insn (insn))
|
||||
- || ((!NONJUMP_INSN_P (next) || GET_CODE (PATTERN (next)) != SEQUENCE)
|
||||
- && arc_attr_type (next) == TYPE_RETURN))
|
||||
- && (!TARGET_PAD_RETURN
|
||||
- || (prev_active_insn (insn)
|
||||
- && prev_active_insn (prev_active_insn (insn))
|
||||
- && prev_active_insn (prev_active_insn (prev_active_insn (insn))))))
|
||||
- return true;
|
||||
- if (NONJUMP_INSN_P (insn)
|
||||
- ? (GET_CODE (PATTERN (insn)) == USE
|
||||
- || GET_CODE (PATTERN (insn)) == CLOBBER
|
||||
- || GET_CODE (PATTERN (insn)) == SEQUENCE)
|
||||
- : JUMP_P (insn)
|
||||
- ? (GET_CODE (PATTERN (insn)) == ADDR_VEC
|
||||
- || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)
|
||||
- : !CALL_P (insn))
|
||||
- return false;
|
||||
- return num_delay_slots (insn) != 0;
|
||||
-}
|
||||
-
|
||||
-/* Return true if the scheduling pass(es) has/have already run,
|
||||
- i.e. where possible, we should try to mitigate high latencies
|
||||
- by different instruction selection. */
|
||||
-
|
||||
-bool
|
||||
-arc_scheduling_not_expected (void)
|
||||
-{
|
||||
- return cfun->machine->arc_reorg_started;
|
||||
-}
|
||||
-
|
||||
/* Code has a minimum p2 alignment of 1, which we must restore after
|
||||
an ADDR_DIFF_VEC. */
|
||||
|
||||
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
|
||||
index d4d9f59a3ea..6c09c86884f 100644
|
||||
--- a/gcc/config/arc/arc.md
|
||||
+++ b/gcc/config/arc/arc.md
|
||||
@@ -2857,43 +2857,25 @@ archs4x, archs4xd"
|
||||
(set_attr "type" "compare")
|
||||
(set_attr "length" "4,4,8")])
|
||||
|
||||
-; w/c/c comes first (rather than w/0/C_0) to prevent the middle-end
|
||||
-; needlessly prioritizing the matching constraint.
|
||||
-; Rcw/0/C_0 comes before w/c/L so that the lower latency conditional
|
||||
-; execution is used where possible.
|
||||
-(define_insn_and_split "adc"
|
||||
- [(set (match_operand:SI 0 "dest_reg_operand" "=w,Rcw,w,Rcw,w")
|
||||
- (plus:SI (plus:SI (ltu:SI (reg:CC_C CC_REG) (const_int 0))
|
||||
- (match_operand:SI 1 "nonmemory_operand"
|
||||
- "%c,0,c,0,cCal"))
|
||||
- (match_operand:SI 2 "nonmemory_operand" "c,C_0,L,I,cCal")))]
|
||||
+(define_insn "adc"
|
||||
+ [(set (match_operand:SI 0 "register_operand" "=r, r,r,r, r,r")
|
||||
+ (plus:SI
|
||||
+ (plus:SI
|
||||
+ (ltu:SI (reg:CC_C CC_REG) (const_int 0))
|
||||
+ (match_operand:SI 1 "nonmemory_operand" "%r, 0,r,0,Cal,r"))
|
||||
+ (match_operand:SI 2 "nonmemory_operand" "r,C_0,L,I, r,Cal")))]
|
||||
"register_operand (operands[1], SImode)
|
||||
|| register_operand (operands[2], SImode)"
|
||||
"@
|
||||
- adc %0,%1,%2
|
||||
- add.cs %0,%1,1
|
||||
- adc %0,%1,%2
|
||||
- adc %0,%1,%2
|
||||
- adc %0,%1,%2"
|
||||
- ; if we have a bad schedule after sched2, split.
|
||||
- "reload_completed
|
||||
- && !optimize_size && (!TARGET_ARC600_FAMILY)
|
||||
- && arc_scheduling_not_expected ()
|
||||
- && arc_sets_cc_p (prev_nonnote_insn (insn))
|
||||
- /* If next comes a return or other insn that needs a delay slot,
|
||||
- expect the adc to get into the delay slot. */
|
||||
- && next_nonnote_insn (insn)
|
||||
- && !arc_need_delay (next_nonnote_insn (insn))
|
||||
- /* Restore operands before emitting. */
|
||||
- && (extract_insn_cached (insn), 1)"
|
||||
- [(set (match_dup 0) (match_dup 3))
|
||||
- (cond_exec
|
||||
- (ltu (reg:CC_C CC_REG) (const_int 0))
|
||||
- (set (match_dup 0) (plus:SI (match_dup 0) (const_int 1))))]
|
||||
- "operands[3] = simplify_gen_binary (PLUS, SImode, operands[1], operands[2]);"
|
||||
+ adc\\t%0,%1,%2
|
||||
+ add.cs\\t%0,%1,1
|
||||
+ adc\\t%0,%1,%2
|
||||
+ adc\\t%0,%1,%2
|
||||
+ adc\\t%0,%1,%2
|
||||
+ adc\\t%0,%1,%2"
|
||||
[(set_attr "cond" "use")
|
||||
(set_attr "type" "cc_arith")
|
||||
- (set_attr "length" "4,4,4,4,8")])
|
||||
+ (set_attr "length" "4,4,4,4,8,8")])
|
||||
|
||||
; combiner-splitter cmp / scc -> cmp / adc
|
||||
(define_split
|
||||
@@ -3025,7 +3007,7 @@ archs4x, archs4xd"
|
||||
DONE;
|
||||
}
|
||||
emit_insn (gen_sub_f (l0, l1, l2));
|
||||
- emit_insn (gen_sbc (h0, h1, h2, gen_rtx_REG (CCmode, CC_REG)));
|
||||
+ emit_insn (gen_sbc (h0, h1, h2));
|
||||
DONE;
|
||||
")
|
||||
|
||||
@@ -3040,44 +3022,25 @@ archs4x, archs4xd"
|
||||
(set_attr "type" "cc_arith")
|
||||
(set_attr "length" "4")])
|
||||
|
||||
-; w/c/c comes first (rather than Rcw/0/C_0) to prevent the middle-end
|
||||
-; needlessly prioritizing the matching constraint.
|
||||
-; Rcw/0/C_0 comes before w/c/L so that the lower latency conditional execution
|
||||
-; is used where possible.
|
||||
-(define_insn_and_split "sbc"
|
||||
- [(set (match_operand:SI 0 "dest_reg_operand" "=w,Rcw,w,Rcw,w")
|
||||
- (minus:SI (minus:SI (match_operand:SI 1 "nonmemory_operand"
|
||||
- "c,0,c,0,cCal")
|
||||
- (ltu:SI (match_operand:CC_C 3 "cc_use_register")
|
||||
- (const_int 0)))
|
||||
- (match_operand:SI 2 "nonmemory_operand" "c,C_0,L,I,cCal")))]
|
||||
+(define_insn "sbc"
|
||||
+ [(set (match_operand:SI 0 "dest_reg_operand" "=r,r,r,r,r,r")
|
||||
+ (minus:SI
|
||||
+ (minus:SI
|
||||
+ (match_operand:SI 1 "nonmemory_operand" "r, 0,r,0, r,Cal")
|
||||
+ (ltu:SI (reg:CC_C CC_REG) (const_int 0)))
|
||||
+ (match_operand:SI 2 "nonmemory_operand" "r,C_0,L,I,Cal,r")))]
|
||||
"register_operand (operands[1], SImode)
|
||||
|| register_operand (operands[2], SImode)"
|
||||
"@
|
||||
- sbc %0,%1,%2
|
||||
- sub.cs %0,%1,1
|
||||
- sbc %0,%1,%2
|
||||
- sbc %0,%1,%2
|
||||
- sbc %0,%1,%2"
|
||||
- ; if we have a bad schedule after sched2, split.
|
||||
- "reload_completed
|
||||
- && !optimize_size && (!TARGET_ARC600_FAMILY)
|
||||
- && arc_scheduling_not_expected ()
|
||||
- && arc_sets_cc_p (prev_nonnote_insn (insn))
|
||||
- /* If next comes a return or other insn that needs a delay slot,
|
||||
- expect the adc to get into the delay slot. */
|
||||
- && next_nonnote_insn (insn)
|
||||
- && !arc_need_delay (next_nonnote_insn (insn))
|
||||
- /* Restore operands before emitting. */
|
||||
- && (extract_insn_cached (insn), 1)"
|
||||
- [(set (match_dup 0) (match_dup 4))
|
||||
- (cond_exec
|
||||
- (ltu (reg:CC_C CC_REG) (const_int 0))
|
||||
- (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))))]
|
||||
- "operands[4] = simplify_gen_binary (MINUS, SImode, operands[1], operands[2]);"
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sub.cs\\t%0,%1,1
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sbc\\t%0,%1,%2"
|
||||
[(set_attr "cond" "use")
|
||||
(set_attr "type" "cc_arith")
|
||||
- (set_attr "length" "4,4,4,4,8")])
|
||||
+ (set_attr "length" "4,4,4,4,8,8")])
|
||||
|
||||
(define_insn "sub_f"
|
||||
[(set (reg:CC CC_REG)
|
||||
--
|
||||
2.16.2
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
From 472472ee0aaccb6389747d6281c34c558bcca7d8 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 20 Jan 2021 23:26:29 +0100
|
||||
Subject: [PATCH] Revert "re PR target/92095 (internal error with -O1
|
||||
-mcpu=niagara2 -fPIE)"
|
||||
|
||||
This reverts commit 0a83f1a441d7aaadecb368c237b6ee70bd7b91d6.
|
||||
|
||||
Building the Buildroot defconfig qemu_sparc_ss10_defconfig using
|
||||
gcc 8.4, 9.3 and 10 produce a broken rootfs that trigger illegal
|
||||
instruction messages.
|
||||
|
||||
gcc 8.3, 9.2 are the latest working gcc version.
|
||||
git bisect between gcc 8.4 and 8.4 allowed to identify
|
||||
the commit that introcuce the regression.
|
||||
|
||||
Reverting this patch allowed to produce a working rootfs.
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Eric Botcazou <ebotcazou@gcc.gnu.org>
|
||||
---
|
||||
gcc/config/sparc/sparc-protos.h | 1 -
|
||||
gcc/config/sparc/sparc.c | 121 +++++++-----------
|
||||
gcc/config/sparc/sparc.md | 5 +-
|
||||
.../gcc.c-torture/compile/20191108-1.c | 14 --
|
||||
gcc/testsuite/gcc.target/sparc/overflow-3.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-4.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-5.c | 2 +-
|
||||
7 files changed, 53 insertions(+), 94 deletions(-)
|
||||
delete mode 100644 gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
|
||||
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
|
||||
index f525cd7a422..0d9f47af644 100644
|
||||
--- a/gcc/config/sparc/sparc-protos.h
|
||||
+++ b/gcc/config/sparc/sparc-protos.h
|
||||
@@ -69,7 +69,6 @@ extern void sparc_split_reg_mem (rtx, rtx, machine_mode);
|
||||
extern void sparc_split_mem_reg (rtx, rtx, machine_mode);
|
||||
extern int sparc_split_reg_reg_legitimate (rtx, rtx);
|
||||
extern void sparc_split_reg_reg (rtx, rtx, machine_mode);
|
||||
-extern const char *output_load_pcrel_sym (rtx *);
|
||||
extern const char *output_ubranch (rtx, rtx_insn *);
|
||||
extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *);
|
||||
extern const char *output_return (rtx_insn *);
|
||||
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
|
||||
index aefced85fe1..3ff6f9200f6 100644
|
||||
--- a/gcc/config/sparc/sparc.c
|
||||
+++ b/gcc/config/sparc/sparc.c
|
||||
@@ -4192,6 +4192,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
|
||||
static bool
|
||||
sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
{
|
||||
+ /* After IRA has run in PIC mode, it is too late to put anything into the
|
||||
+ constant pool if the PIC register hasn't already been initialized. */
|
||||
+ if ((lra_in_progress || reload_in_progress)
|
||||
+ && flag_pic
|
||||
+ && !crtl->uses_pic_offset_table)
|
||||
+ return true;
|
||||
+
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case CONST_INT:
|
||||
@@ -4227,11 +4234,9 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
}
|
||||
|
||||
/* Global Offset Table support. */
|
||||
-static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
-static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
static GTY(()) rtx got_helper_rtx = NULL_RTX;
|
||||
-
|
||||
-static GTY(()) bool got_helper_needed = false;
|
||||
+static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
+static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
|
||||
/* Return the SYMBOL_REF for the Global Offset Table. */
|
||||
|
||||
@@ -4244,6 +4249,27 @@ sparc_got (void)
|
||||
return got_symbol_rtx;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GAS_HIDDEN
|
||||
+# define USE_HIDDEN_LINKONCE 1
|
||||
+#else
|
||||
+# define USE_HIDDEN_LINKONCE 0
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+get_pc_thunk_name (char name[32], unsigned int regno)
|
||||
+{
|
||||
+ const char *reg_name = reg_names[regno];
|
||||
+
|
||||
+ /* Skip the leading '%' as that cannot be used in a
|
||||
+ symbol name. */
|
||||
+ reg_name += 1;
|
||||
+
|
||||
+ if (USE_HIDDEN_LINKONCE)
|
||||
+ sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
|
||||
+ else
|
||||
+ ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
|
||||
+}
|
||||
+
|
||||
/* Wrapper around the load_pcrel_sym{si,di} patterns. */
|
||||
|
||||
static rtx
|
||||
@@ -4263,78 +4289,30 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2)
|
||||
return insn;
|
||||
}
|
||||
|
||||
-/* Output the load_pcrel_sym{si,di} patterns. */
|
||||
-
|
||||
-const char *
|
||||
-output_load_pcrel_sym (rtx *operands)
|
||||
-{
|
||||
- if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands);
|
||||
- output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
-
|
||||
- if (operands[2] == got_helper_rtx)
|
||||
- got_helper_needed = true;
|
||||
-
|
||||
- return "";
|
||||
-}
|
||||
-
|
||||
-#ifdef HAVE_GAS_HIDDEN
|
||||
-# define USE_HIDDEN_LINKONCE 1
|
||||
-#else
|
||||
-# define USE_HIDDEN_LINKONCE 0
|
||||
-#endif
|
||||
-
|
||||
/* Emit code to load the GOT register. */
|
||||
|
||||
void
|
||||
load_got_register (void)
|
||||
{
|
||||
- rtx insn;
|
||||
+ if (!got_register_rtx)
|
||||
+ got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
|
||||
if (TARGET_VXWORKS_RTP)
|
||||
- {
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = pic_offset_table_rtx;
|
||||
-
|
||||
- insn = gen_vxworks_load_got ();
|
||||
- }
|
||||
+ emit_insn (gen_vxworks_load_got ());
|
||||
else
|
||||
{
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
-
|
||||
/* The GOT symbol is subject to a PC-relative relocation so we need a
|
||||
helper function to add the PC value and thus get the final value. */
|
||||
if (!got_helper_rtx)
|
||||
{
|
||||
char name[32];
|
||||
-
|
||||
- /* Skip the leading '%' as that cannot be used in a symbol name. */
|
||||
- if (USE_HIDDEN_LINKONCE)
|
||||
- sprintf (name, "__sparc_get_pc_thunk.%s",
|
||||
- reg_names[REGNO (got_register_rtx)] + 1);
|
||||
- else
|
||||
- ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC",
|
||||
- REGNO (got_register_rtx));
|
||||
-
|
||||
+ get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
|
||||
}
|
||||
|
||||
- insn
|
||||
- = gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx);
|
||||
+ emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (),
|
||||
+ got_helper_rtx));
|
||||
}
|
||||
-
|
||||
- emit_insn (insn);
|
||||
}
|
||||
|
||||
/* Ensure that we are not using patterns that are not OK with PIC. */
|
||||
@@ -5499,7 +5477,7 @@ save_local_or_in_reg_p (unsigned int regno, int leaf_function)
|
||||
return true;
|
||||
|
||||
/* GOT register (%l7) if needed. */
|
||||
- if (got_register_rtx && regno == REGNO (got_register_rtx))
|
||||
+ if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx)
|
||||
return true;
|
||||
|
||||
/* If the function accesses prior frames, the frame pointer and the return
|
||||
@@ -12542,9 +12520,10 @@ static void
|
||||
sparc_file_end (void)
|
||||
{
|
||||
/* If we need to emit the special GOT helper function, do so now. */
|
||||
- if (got_helper_needed)
|
||||
+ if (got_helper_rtx)
|
||||
{
|
||||
const char *name = XSTR (got_helper_rtx, 0);
|
||||
+ const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
bool do_cfi;
|
||||
#endif
|
||||
@@ -12581,22 +12560,17 @@ sparc_file_end (void)
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
do_cfi = dwarf2out_do_cfi_asm ();
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_startproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_startproc\n");
|
||||
#endif
|
||||
if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
|
||||
+ reg_name, reg_name);
|
||||
else
|
||||
- {
|
||||
- output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
|
||||
+ reg_name, reg_name);
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_endproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_endproc\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13091,10 +13065,7 @@ sparc_init_pic_reg (void)
|
||||
edge entry_edge;
|
||||
rtx_insn *seq;
|
||||
|
||||
- /* In PIC mode, we need to always initialize the PIC register if optimization
|
||||
- is enabled, because we are called from IRA and LRA may later force things
|
||||
- to the constant pool for optimization purposes. */
|
||||
- if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize))
|
||||
+ if (!crtl->uses_pic_offset_table)
|
||||
return;
|
||||
|
||||
start_sequence ();
|
||||
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
|
||||
index 231c0d84778..899804b80ae 100644
|
||||
--- a/gcc/config/sparc/sparc.md
|
||||
+++ b/gcc/config/sparc/sparc.md
|
||||
@@ -1604,7 +1604,10 @@
|
||||
(clobber (reg:P O7_REG))]
|
||||
"REGNO (operands[0]) == INTVAL (operands[3])"
|
||||
{
|
||||
- return output_load_pcrel_sym (operands);
|
||||
+ if (flag_delayed_branch)
|
||||
+ return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
|
||||
+ else
|
||||
+ return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
|
||||
}
|
||||
[(set (attr "type") (const_string "multi"))
|
||||
(set (attr "length")
|
||||
diff --git a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c b/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
deleted file mode 100644
|
||||
index 7929751bb06..00000000000
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-/* PR target/92095 */
|
||||
-/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
|
||||
-
|
||||
-typedef union {
|
||||
- double a;
|
||||
- int b[2];
|
||||
-} c;
|
||||
-
|
||||
-double d(int e)
|
||||
-{
|
||||
- c f;
|
||||
- (&f)->b[0] = 15728640;
|
||||
- return e ? -(&f)->a : (&f)->a;
|
||||
-}
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-3.c b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
index 52d6ab2b688..86dddfb09e6 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie" } */
|
||||
+/* { dg-options "-O" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-4.c b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
index c6121b958c3..019feee335c 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mno-vis3 -mno-vis4" } */
|
||||
+/* { dg-options "-O -mno-vis3 -mno-vis4" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-5.c b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
index f00283f6e7b..67d4ac38095 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mvis3" } */
|
||||
+/* { dg-options "-O -mvis3" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
From bb9b71752267444b4360442b89129bfc0ae938d3 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 20 Jan 2021 23:06:07 +0100
|
||||
Subject: [PATCH] Revert "re PR target/92095 (internal error with -O1
|
||||
-mcpu=niagara2 -fPIE)"
|
||||
|
||||
This reverts commit 3fcce773f0f914c0499b130c6e9efa0e45ee54a0.
|
||||
|
||||
Building the Buildroot defconfig qemu_sparc_ss10_defconfig using
|
||||
gcc 8.4, 9.3 and 10 produce a broken rootfs that trigger illegal
|
||||
instruction messages.
|
||||
|
||||
gcc 8.3, 9.2 are the latest working gcc version.
|
||||
git bisect between gcc 8.4 and 8.4 allowed to identify
|
||||
the commit that introcuce the regression.
|
||||
|
||||
Reverting this patch allowed to produce a working rootfs.
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Eric Botcazou <ebotcazou@gcc.gnu.org>
|
||||
---
|
||||
gcc/config/sparc/sparc-protos.h | 1 -
|
||||
gcc/config/sparc/sparc.c | 121 +++++++-----------
|
||||
gcc/config/sparc/sparc.md | 5 +-
|
||||
.../gcc.c-torture/compile/20191108-1.c | 14 --
|
||||
gcc/testsuite/gcc.target/sparc/overflow-3.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-4.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-5.c | 2 +-
|
||||
7 files changed, 53 insertions(+), 94 deletions(-)
|
||||
delete mode 100644 gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
|
||||
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
|
||||
index b3f73c2f2bf..71a067e871c 100644
|
||||
--- a/gcc/config/sparc/sparc-protos.h
|
||||
+++ b/gcc/config/sparc/sparc-protos.h
|
||||
@@ -69,7 +69,6 @@ extern void sparc_split_reg_mem (rtx, rtx, machine_mode);
|
||||
extern void sparc_split_mem_reg (rtx, rtx, machine_mode);
|
||||
extern int sparc_split_reg_reg_legitimate (rtx, rtx);
|
||||
extern void sparc_split_reg_reg (rtx, rtx, machine_mode);
|
||||
-extern const char *output_load_pcrel_sym (rtx *);
|
||||
extern const char *output_ubranch (rtx, rtx_insn *);
|
||||
extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *);
|
||||
extern const char *output_return (rtx_insn *);
|
||||
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
|
||||
index 73032d33596..db1b428db90 100644
|
||||
--- a/gcc/config/sparc/sparc.c
|
||||
+++ b/gcc/config/sparc/sparc.c
|
||||
@@ -4200,6 +4200,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
|
||||
static bool
|
||||
sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
{
|
||||
+ /* After IRA has run in PIC mode, it is too late to put anything into the
|
||||
+ constant pool if the PIC register hasn't already been initialized. */
|
||||
+ if ((lra_in_progress || reload_in_progress)
|
||||
+ && flag_pic
|
||||
+ && !crtl->uses_pic_offset_table)
|
||||
+ return true;
|
||||
+
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case CONST_INT:
|
||||
@@ -4235,11 +4242,9 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
}
|
||||
|
||||
/* Global Offset Table support. */
|
||||
-static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
-static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
static GTY(()) rtx got_helper_rtx = NULL_RTX;
|
||||
-
|
||||
-static GTY(()) bool got_helper_needed = false;
|
||||
+static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
+static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
|
||||
/* Return the SYMBOL_REF for the Global Offset Table. */
|
||||
|
||||
@@ -4252,6 +4257,27 @@ sparc_got (void)
|
||||
return got_symbol_rtx;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GAS_HIDDEN
|
||||
+# define USE_HIDDEN_LINKONCE 1
|
||||
+#else
|
||||
+# define USE_HIDDEN_LINKONCE 0
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+get_pc_thunk_name (char name[32], unsigned int regno)
|
||||
+{
|
||||
+ const char *reg_name = reg_names[regno];
|
||||
+
|
||||
+ /* Skip the leading '%' as that cannot be used in a
|
||||
+ symbol name. */
|
||||
+ reg_name += 1;
|
||||
+
|
||||
+ if (USE_HIDDEN_LINKONCE)
|
||||
+ sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
|
||||
+ else
|
||||
+ ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
|
||||
+}
|
||||
+
|
||||
/* Wrapper around the load_pcrel_sym{si,di} patterns. */
|
||||
|
||||
static rtx
|
||||
@@ -4271,78 +4297,30 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2)
|
||||
return insn;
|
||||
}
|
||||
|
||||
-/* Output the load_pcrel_sym{si,di} patterns. */
|
||||
-
|
||||
-const char *
|
||||
-output_load_pcrel_sym (rtx *operands)
|
||||
-{
|
||||
- if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands);
|
||||
- output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
-
|
||||
- if (operands[2] == got_helper_rtx)
|
||||
- got_helper_needed = true;
|
||||
-
|
||||
- return "";
|
||||
-}
|
||||
-
|
||||
-#ifdef HAVE_GAS_HIDDEN
|
||||
-# define USE_HIDDEN_LINKONCE 1
|
||||
-#else
|
||||
-# define USE_HIDDEN_LINKONCE 0
|
||||
-#endif
|
||||
-
|
||||
/* Emit code to load the GOT register. */
|
||||
|
||||
void
|
||||
load_got_register (void)
|
||||
{
|
||||
- rtx insn;
|
||||
+ if (!got_register_rtx)
|
||||
+ got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
|
||||
if (TARGET_VXWORKS_RTP)
|
||||
- {
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = pic_offset_table_rtx;
|
||||
-
|
||||
- insn = gen_vxworks_load_got ();
|
||||
- }
|
||||
+ emit_insn (gen_vxworks_load_got ());
|
||||
else
|
||||
{
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
-
|
||||
/* The GOT symbol is subject to a PC-relative relocation so we need a
|
||||
helper function to add the PC value and thus get the final value. */
|
||||
if (!got_helper_rtx)
|
||||
{
|
||||
char name[32];
|
||||
-
|
||||
- /* Skip the leading '%' as that cannot be used in a symbol name. */
|
||||
- if (USE_HIDDEN_LINKONCE)
|
||||
- sprintf (name, "__sparc_get_pc_thunk.%s",
|
||||
- reg_names[REGNO (got_register_rtx)] + 1);
|
||||
- else
|
||||
- ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC",
|
||||
- REGNO (got_register_rtx));
|
||||
-
|
||||
+ get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
|
||||
}
|
||||
|
||||
- insn
|
||||
- = gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx);
|
||||
+ emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (),
|
||||
+ got_helper_rtx));
|
||||
}
|
||||
-
|
||||
- emit_insn (insn);
|
||||
}
|
||||
|
||||
/* Ensure that we are not using patterns that are not OK with PIC. */
|
||||
@@ -5494,7 +5472,7 @@ save_local_or_in_reg_p (unsigned int regno, int leaf_function)
|
||||
return true;
|
||||
|
||||
/* GOT register (%l7) if needed. */
|
||||
- if (got_register_rtx && regno == REGNO (got_register_rtx))
|
||||
+ if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx)
|
||||
return true;
|
||||
|
||||
/* If the function accesses prior frames, the frame pointer and the return
|
||||
@@ -12475,9 +12453,10 @@ static void
|
||||
sparc_file_end (void)
|
||||
{
|
||||
/* If we need to emit the special GOT helper function, do so now. */
|
||||
- if (got_helper_needed)
|
||||
+ if (got_helper_rtx)
|
||||
{
|
||||
const char *name = XSTR (got_helper_rtx, 0);
|
||||
+ const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
bool do_cfi;
|
||||
#endif
|
||||
@@ -12514,22 +12493,17 @@ sparc_file_end (void)
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
do_cfi = dwarf2out_do_cfi_asm ();
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_startproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_startproc\n");
|
||||
#endif
|
||||
if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
|
||||
+ reg_name, reg_name);
|
||||
else
|
||||
- {
|
||||
- output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
|
||||
+ reg_name, reg_name);
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_endproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_endproc\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13035,10 +13009,7 @@ sparc_init_pic_reg (void)
|
||||
edge entry_edge;
|
||||
rtx_insn *seq;
|
||||
|
||||
- /* In PIC mode, we need to always initialize the PIC register if optimization
|
||||
- is enabled, because we are called from IRA and LRA may later force things
|
||||
- to the constant pool for optimization purposes. */
|
||||
- if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize))
|
||||
+ if (!crtl->uses_pic_offset_table)
|
||||
return;
|
||||
|
||||
start_sequence ();
|
||||
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
|
||||
index 468e2cc5d3b..25134bd1148 100644
|
||||
--- a/gcc/config/sparc/sparc.md
|
||||
+++ b/gcc/config/sparc/sparc.md
|
||||
@@ -1601,7 +1601,10 @@
|
||||
(clobber (reg:P O7_REG))]
|
||||
"REGNO (operands[0]) == INTVAL (operands[3])"
|
||||
{
|
||||
- return output_load_pcrel_sym (operands);
|
||||
+ if (flag_delayed_branch)
|
||||
+ return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
|
||||
+ else
|
||||
+ return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
|
||||
}
|
||||
[(set (attr "type") (const_string "multi"))
|
||||
(set (attr "length")
|
||||
diff --git a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c b/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
deleted file mode 100644
|
||||
index 7929751bb06..00000000000
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-/* PR target/92095 */
|
||||
-/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
|
||||
-
|
||||
-typedef union {
|
||||
- double a;
|
||||
- int b[2];
|
||||
-} c;
|
||||
-
|
||||
-double d(int e)
|
||||
-{
|
||||
- c f;
|
||||
- (&f)->b[0] = 15728640;
|
||||
- return e ? -(&f)->a : (&f)->a;
|
||||
-}
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-3.c b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
index 18253bb6e5e..8cb24f52f7b 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
-/* { dg-options "-O -fno-pie" } */
|
||||
+/* { dg-options "-O" } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
|
||||
#include <stdbool.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-4.c b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
index fb30877efb9..868edea2b9e 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
-/* { dg-options "-O -fno-pie -mno-vis3" } */
|
||||
+/* { dg-options "-O -mno-vis3" } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
|
||||
#include <stdbool.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-5.c b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
index 509d957715d..501ce04f7a1 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
-/* { dg-options "-O -fno-pie -mvis3" } */
|
||||
+/* { dg-options "-O -mvis3" } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
|
||||
#include <stdbool.h>
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
From 0d7fe4806d9dce76367c193d5199df6a2b98009f Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 20 Jan 2021 23:22:16 +0100
|
||||
Subject: [PATCH] Revert "re PR target/92095 (internal error with -O1
|
||||
-mcpu=niagara2 -fPIE)"
|
||||
|
||||
This reverts commit 6bf2990842388101897b6f465524cbc295ee8cf9.
|
||||
|
||||
Building the Buildroot defconfig qemu_sparc_ss10_defconfig using
|
||||
gcc 8.4, 9.3 and 10 produce a broken rootfs that trigger illegal
|
||||
instruction messages.
|
||||
|
||||
gcc 8.3, 9.2 are the latest working gcc version.
|
||||
git bisect between gcc 8.4 and 8.4 allowed to identify
|
||||
the commit that introcuce the regression.
|
||||
|
||||
Reverting this patch allowed to produce a working rootfs.
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Eric Botcazou <ebotcazou@gcc.gnu.org>
|
||||
---
|
||||
gcc/config/sparc/sparc-protos.h | 1 -
|
||||
gcc/config/sparc/sparc.c | 121 +++++++-----------
|
||||
gcc/config/sparc/sparc.md | 5 +-
|
||||
.../gcc.c-torture/compile/20191108-1.c | 14 --
|
||||
gcc/testsuite/gcc.target/sparc/overflow-3.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-4.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-5.c | 2 +-
|
||||
7 files changed, 53 insertions(+), 94 deletions(-)
|
||||
delete mode 100644 gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
|
||||
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
|
||||
index ef1adb69ede..9bdae7b9faa 100644
|
||||
--- a/gcc/config/sparc/sparc-protos.h
|
||||
+++ b/gcc/config/sparc/sparc-protos.h
|
||||
@@ -69,7 +69,6 @@ extern void sparc_split_reg_mem (rtx, rtx, machine_mode);
|
||||
extern void sparc_split_mem_reg (rtx, rtx, machine_mode);
|
||||
extern int sparc_split_reg_reg_legitimate (rtx, rtx);
|
||||
extern void sparc_split_reg_reg (rtx, rtx, machine_mode);
|
||||
-extern const char *output_load_pcrel_sym (rtx *);
|
||||
extern const char *output_ubranch (rtx, rtx_insn *);
|
||||
extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *);
|
||||
extern const char *output_return (rtx_insn *);
|
||||
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
|
||||
index a993aab7639..2974d174e93 100644
|
||||
--- a/gcc/config/sparc/sparc.c
|
||||
+++ b/gcc/config/sparc/sparc.c
|
||||
@@ -4205,6 +4205,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
|
||||
static bool
|
||||
sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
{
|
||||
+ /* After IRA has run in PIC mode, it is too late to put anything into the
|
||||
+ constant pool if the PIC register hasn't already been initialized. */
|
||||
+ if ((lra_in_progress || reload_in_progress)
|
||||
+ && flag_pic
|
||||
+ && !crtl->uses_pic_offset_table)
|
||||
+ return true;
|
||||
+
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case CONST_INT:
|
||||
@@ -4240,11 +4247,9 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
}
|
||||
|
||||
/* Global Offset Table support. */
|
||||
-static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
-static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
static GTY(()) rtx got_helper_rtx = NULL_RTX;
|
||||
-
|
||||
-static GTY(()) bool got_helper_needed = false;
|
||||
+static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
+static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
|
||||
/* Return the SYMBOL_REF for the Global Offset Table. */
|
||||
|
||||
@@ -4257,6 +4262,27 @@ sparc_got (void)
|
||||
return got_symbol_rtx;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GAS_HIDDEN
|
||||
+# define USE_HIDDEN_LINKONCE 1
|
||||
+#else
|
||||
+# define USE_HIDDEN_LINKONCE 0
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+get_pc_thunk_name (char name[32], unsigned int regno)
|
||||
+{
|
||||
+ const char *reg_name = reg_names[regno];
|
||||
+
|
||||
+ /* Skip the leading '%' as that cannot be used in a
|
||||
+ symbol name. */
|
||||
+ reg_name += 1;
|
||||
+
|
||||
+ if (USE_HIDDEN_LINKONCE)
|
||||
+ sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
|
||||
+ else
|
||||
+ ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
|
||||
+}
|
||||
+
|
||||
/* Wrapper around the load_pcrel_sym{si,di} patterns. */
|
||||
|
||||
static rtx
|
||||
@@ -4276,78 +4302,30 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2)
|
||||
return insn;
|
||||
}
|
||||
|
||||
-/* Output the load_pcrel_sym{si,di} patterns. */
|
||||
-
|
||||
-const char *
|
||||
-output_load_pcrel_sym (rtx *operands)
|
||||
-{
|
||||
- if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands);
|
||||
- output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
-
|
||||
- if (operands[2] == got_helper_rtx)
|
||||
- got_helper_needed = true;
|
||||
-
|
||||
- return "";
|
||||
-}
|
||||
-
|
||||
-#ifdef HAVE_GAS_HIDDEN
|
||||
-# define USE_HIDDEN_LINKONCE 1
|
||||
-#else
|
||||
-# define USE_HIDDEN_LINKONCE 0
|
||||
-#endif
|
||||
-
|
||||
/* Emit code to load the GOT register. */
|
||||
|
||||
void
|
||||
load_got_register (void)
|
||||
{
|
||||
- rtx insn;
|
||||
+ if (!got_register_rtx)
|
||||
+ got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
|
||||
if (TARGET_VXWORKS_RTP)
|
||||
- {
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = pic_offset_table_rtx;
|
||||
-
|
||||
- insn = gen_vxworks_load_got ();
|
||||
- }
|
||||
+ emit_insn (gen_vxworks_load_got ());
|
||||
else
|
||||
{
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
-
|
||||
/* The GOT symbol is subject to a PC-relative relocation so we need a
|
||||
helper function to add the PC value and thus get the final value. */
|
||||
if (!got_helper_rtx)
|
||||
{
|
||||
char name[32];
|
||||
-
|
||||
- /* Skip the leading '%' as that cannot be used in a symbol name. */
|
||||
- if (USE_HIDDEN_LINKONCE)
|
||||
- sprintf (name, "__sparc_get_pc_thunk.%s",
|
||||
- reg_names[REGNO (got_register_rtx)] + 1);
|
||||
- else
|
||||
- ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC",
|
||||
- REGNO (got_register_rtx));
|
||||
-
|
||||
+ get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
|
||||
}
|
||||
|
||||
- insn
|
||||
- = gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx);
|
||||
+ emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (),
|
||||
+ got_helper_rtx));
|
||||
}
|
||||
-
|
||||
- emit_insn (insn);
|
||||
}
|
||||
|
||||
/* Ensure that we are not using patterns that are not OK with PIC. */
|
||||
@@ -5512,7 +5490,7 @@ save_local_or_in_reg_p (unsigned int regno, int leaf_function)
|
||||
return true;
|
||||
|
||||
/* GOT register (%l7) if needed. */
|
||||
- if (got_register_rtx && regno == REGNO (got_register_rtx))
|
||||
+ if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx)
|
||||
return true;
|
||||
|
||||
/* If the function accesses prior frames, the frame pointer and the return
|
||||
@@ -12555,9 +12533,10 @@ static void
|
||||
sparc_file_end (void)
|
||||
{
|
||||
/* If we need to emit the special GOT helper function, do so now. */
|
||||
- if (got_helper_needed)
|
||||
+ if (got_helper_rtx)
|
||||
{
|
||||
const char *name = XSTR (got_helper_rtx, 0);
|
||||
+ const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
bool do_cfi;
|
||||
#endif
|
||||
@@ -12594,22 +12573,17 @@ sparc_file_end (void)
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
do_cfi = dwarf2out_do_cfi_asm ();
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_startproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_startproc\n");
|
||||
#endif
|
||||
if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
|
||||
+ reg_name, reg_name);
|
||||
else
|
||||
- {
|
||||
- output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
|
||||
+ reg_name, reg_name);
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_endproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_endproc\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13115,10 +13089,7 @@ sparc_init_pic_reg (void)
|
||||
edge entry_edge;
|
||||
rtx_insn *seq;
|
||||
|
||||
- /* In PIC mode, we need to always initialize the PIC register if optimization
|
||||
- is enabled, because we are called from IRA and LRA may later force things
|
||||
- to the constant pool for optimization purposes. */
|
||||
- if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize))
|
||||
+ if (!crtl->uses_pic_offset_table)
|
||||
return;
|
||||
|
||||
start_sequence ();
|
||||
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
|
||||
index 0a6e27ffa83..7af62d599b9 100644
|
||||
--- a/gcc/config/sparc/sparc.md
|
||||
+++ b/gcc/config/sparc/sparc.md
|
||||
@@ -1604,7 +1604,10 @@
|
||||
(clobber (reg:P O7_REG))]
|
||||
"REGNO (operands[0]) == INTVAL (operands[3])"
|
||||
{
|
||||
- return output_load_pcrel_sym (operands);
|
||||
+ if (flag_delayed_branch)
|
||||
+ return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
|
||||
+ else
|
||||
+ return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
|
||||
}
|
||||
[(set (attr "type") (const_string "multi"))
|
||||
(set (attr "length")
|
||||
diff --git a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c b/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
deleted file mode 100644
|
||||
index 7929751bb06..00000000000
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-/* PR target/92095 */
|
||||
-/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
|
||||
-
|
||||
-typedef union {
|
||||
- double a;
|
||||
- int b[2];
|
||||
-} c;
|
||||
-
|
||||
-double d(int e)
|
||||
-{
|
||||
- c f;
|
||||
- (&f)->b[0] = 15728640;
|
||||
- return e ? -(&f)->a : (&f)->a;
|
||||
-}
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-3.c b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
index 52d6ab2b688..86dddfb09e6 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie" } */
|
||||
+/* { dg-options "-O" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-4.c b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
index c6121b958c3..019feee335c 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mno-vis3 -mno-vis4" } */
|
||||
+/* { dg-options "-O -mno-vis3 -mno-vis4" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-5.c b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
index f00283f6e7b..67d4ac38095 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mvis3" } */
|
||||
+/* { dg-options "-O -mvis3" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
From 0ac781b0b0deef5c02c32a70ac484f882c3f4dd0 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 24 Dec 2019 18:55:57 +0100
|
||||
Subject: [PATCH] fix matroska build without js, taglib or atrailers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
i2i function is used in matroska_handler.cc but this function is defined
|
||||
only if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS)
|
||||
as a result compilation fails if HAVE_MATROSKA is set but HAVE_JS,
|
||||
HAVE_TAGLIG or ATRAILERS are not.
|
||||
|
||||
Backported from: 0ac781b0b0deef5c02c32a70ac484f882c3f4dd0
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
|
||||
---
|
||||
src/string_converter.cc | 2 +-
|
||||
src/string_converter.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/string_converter.cc b/src/string_converter.cc
|
||||
index f669c661..7a3c55d7 100644
|
||||
--- a/src/string_converter.cc
|
||||
+++ b/src/string_converter.cc
|
||||
@@ -218,7 +218,7 @@ Ref<StringConverter> StringConverter::p2i()
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS)
|
||||
+#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS) || defined(HAVE_MATROSKA)
|
||||
|
||||
Ref<StringConverter> StringConverter::i2i()
|
||||
{
|
||||
diff --git a/src/string_converter.h b/src/string_converter.h
|
||||
index 58495430..f75bf833 100644
|
||||
--- a/src/string_converter.h
|
||||
+++ b/src/string_converter.h
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
static zmm::Ref<StringConverter> p2i();
|
||||
|
||||
#endif
|
||||
-#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS)
|
||||
+#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS) || defined(HAVE_MATROSKA)
|
||||
/// \brief safeguard - internal to internal - needed to catch some
|
||||
/// scenarious where the user may have forgotten to add proper conversion
|
||||
/// in the script.
|
||||
--
|
||||
2.26.1
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
From 7fdcabd80c823694d190e5baa8c657ffcae5e777 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 31 Jan 2020 17:14:11 +0100
|
||||
Subject: [PATCH] cmake/FindLibMagic.cmake: fix static linking
|
||||
|
||||
libmagic can optionally depends on xz (for lzma) or bzip2 since version
|
||||
5.38 and
|
||||
https://github.com/file/file/commit/b259a07ea95827f565faa20f0316e5b2704064f7
|
||||
so use pkg-config to retrieve those static dependencies and avoid the
|
||||
following build failure:
|
||||
|
||||
[100%] Linking CXX executable gerbera
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/br-user/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmagic.a(compress.o): in function `uncompressbuf':
|
||||
compress.c:(.text+0x69c): undefined reference to `BZ2_bzDecompressInit'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x710): undefined reference to `BZ2_bzDecompress'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x730): undefined reference to `BZ2_bzDecompressEnd'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x7bc): undefined reference to `lzma_auto_decoder'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x828): undefined reference to `lzma_code'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x848): undefined reference to `lzma_end'
|
||||
|
||||
It should be noted that libmagic.pc is not currently provided in the
|
||||
official file package (which provides libmagic), an issue has been
|
||||
opened to add libmagic.pc: https://bugs.astron.com/view.php?id=136
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/37b1ef54dc41100689f311fbc31fc9300dc6ae63
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/gerbera/gerbera/commit/7fdcabd80c823694d190e5baa8c657ffcae5e777]
|
||||
---
|
||||
cmake/FindLibMagic.cmake | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindLibMagic.cmake b/cmake/FindLibMagic.cmake
|
||||
index f68ab923..04995af4 100644
|
||||
--- a/cmake/FindLibMagic.cmake
|
||||
+++ b/cmake/FindLibMagic.cmake
|
||||
@@ -1,11 +1,22 @@
|
||||
INCLUDE (FindPackageHandleStandardArgs)
|
||||
|
||||
-FIND_PATH(MAGIC_INCLUDE_DIR magic.h)
|
||||
-FIND_LIBRARY(MAGIC_LIBRARIES NAMES magic)
|
||||
+find_package(PkgConfig QUIET)
|
||||
+
|
||||
+pkg_check_modules(PC_MAGIC QUIET libmagic)
|
||||
+
|
||||
+FIND_PATH(MAGIC_INCLUDE_DIR magic.h
|
||||
+ HINTS ${PC_MAGIC_INCLUDEDIR} ${PC_MAGIC_INCLUDE_DIRS})
|
||||
+FIND_LIBRARY(MAGIC_LIBRARIES NAMES magic
|
||||
+ HINTS ${PC_MAGIC_LIBDIR} ${PC_MAGIC_LIBRARY_DIRS})
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set MAGIC_FOUND to TRUE
|
||||
find_package_handle_standard_args(MAGIC DEFAULT_MSG MAGIC_LIBRARIES)
|
||||
|
||||
+if (MAGIC_FOUND)
|
||||
+ set (MAGIC_LIBRARIES ${MAGIC_LIBRARY} ${PC_MAGIC_LIBRARIES})
|
||||
+ set (MAGIC_INCLUDE_DIRS ${MAGIC_INCLUDE_DIR} )
|
||||
+endif ()
|
||||
+
|
||||
MARK_AS_ADVANCED(
|
||||
MAGIC_LIBRARIES
|
||||
MAGIC_INCLUDE_DIRS )
|
||||
@@ -1,37 +0,0 @@
|
||||
From aab2eacbaad10759294f4fd74bbb5ecef3cf3a8d Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 24 Dec 2019 22:57:18 +0100
|
||||
Subject: [PATCH] cmake/FindMatroska: fix static linking
|
||||
|
||||
Fix static linking with libmatrasoka by adding PC_EBM_LIBRARIES to
|
||||
EBML_LIBRARIES and PC_MAT_LIBRARIES to MATROSKA_LIBRARIES
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/gerbera/gerbera/commit/aab2eacbaad10759294f4fd74bbb5ecef3cf3a8d]
|
||||
---
|
||||
cmake/FindMatroska.cmake | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindMatroska.cmake b/cmake/FindMatroska.cmake
|
||||
index 4b09a5ec..12ca593d 100644
|
||||
--- a/cmake/FindMatroska.cmake
|
||||
+++ b/cmake/FindMatroska.cmake
|
||||
@@ -23,7 +23,7 @@ FIND_LIBRARY(EBML_LIBRARY ebml
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EBML
|
||||
REQUIRED_VARS EBML_LIBRARY EBML_INCLUDE_DIR)
|
||||
if (EBML_FOUND)
|
||||
- set (EBML_LIBRARIES ${EBML_LIBRARY})
|
||||
+ set (EBML_LIBRARIES ${EBML_LIBRARY} ${PC_EBM_LIBRARIES})
|
||||
set (EBML_INCLUDE_DIRS ${EBML_INCLUDE_DIR} )
|
||||
endif ()
|
||||
MARK_AS_ADVANCED(
|
||||
@@ -41,7 +41,7 @@ find_library(MATROSKA_LIBRARY matroska
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATROSKA
|
||||
REQUIRED_VARS MATROSKA_LIBRARY MATROSKA_INCLUDE_DIR)
|
||||
if (MATROSKA_FOUND)
|
||||
- set (MATROSKA_LIBRARIES ${MATROSKA_LIBRARY})
|
||||
+ set (MATROSKA_LIBRARIES ${MATROSKA_LIBRARY} ${PC_MAT_LIBRARIES})
|
||||
set (MATROSKA_INCLUDE_DIRS ${MATROSKA_INCLUDE_DIR} )
|
||||
endif ()
|
||||
MARK_AS_ADVANCED(
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user