add proposed upstream patch to fix abort on net-boot, update Fedora uEFI patch

This commit is contained in:
Peter Robinson 2017-07-12 20:13:28 +01:00
parent 67dc98c14e
commit 0e9cdc48e8
3 changed files with 60 additions and 6 deletions

View File

@ -0,0 +1,41 @@
From patchwork Wed Jul 12 14:34:50 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [U-Boot] net: Mark the ip_udp_hdr struct as packed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
X-Patchwork-Id: 787298
Message-Id: <20170712143450.12233-1-maxime.ripard@free-electrons.com>
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Wed, 12 Jul 2017 16:34:50 +0200
The -mno-unaligned-access flag used on ARM to prevent GCC from generating
unaligned accesses (obviously) will only do so on packed structures.
It seems like gcc 7.1 is a bit stricter than previous gcc versions on this,
and using it lead to data abort for unaligned accesses when generating
network traffic.
Fix this by adding the packed attribute to the ip_udp_hdr structure in
order to let GCC do its job.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
include/net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net.h b/include/net.h
index 997db9210a8f..7b815afffafa 100644
--- a/include/net.h
+++ b/include/net.h
@@ -390,7 +390,7 @@ struct ip_udp_hdr {
u16 udp_dst; /* UDP destination port */
u16 udp_len; /* Length of UDP packet */
u16 udp_xsum; /* Checksum */
-};
+} __attribute__ ((packed));
#define IP_UDP_HDR_SIZE (sizeof(struct ip_udp_hdr))
#define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE)

View File

@ -23,6 +23,7 @@ Patch9: arm-tegra-nyan-chromebook.patch
Patch10: dragonboard-fixes.patch
Patch11: uefi-fixes.patch
Patch12: device-tree-overlays.patch
Patch13: net-Mark-the-ip_udp_hdr-struct-as-packed.patch
# Patch19: 0001-arm-mvebu-enable-generic-distro-boot-config.patch

View File

@ -1,15 +1,15 @@
From dfe26348e0255804981754b529b66790972833b9 Mon Sep 17 00:00:00 2001
From 95140df8476e255cb279a60228b9c703b3ca318f Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Mon, 24 Apr 2017 23:45:37 +0100
Date: Wed, 12 Jul 2017 08:43:31 +0100
Subject: [PATCH] use Fedora specific EFI path/name
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
include/config_distro_bootcmd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
include/config_distro_bootcmd.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 0e01e8240d..756ea121e0 100644
index 4b2c493ae3..704dee7772 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -88,7 +88,7 @@
@ -30,6 +30,18 @@ index 0e01e8240d..756ea121e0 100644
"if fdt addr ${fdt_addr_r}; then " \
"bootefi ${kernel_addr_r} ${fdt_addr_r};" \
"else " \
@@ -136,9 +136,9 @@
"fi;" \
"done;" \
"if test -e ${devtype} ${devnum}:${distro_bootpart} " \
- "efi/boot/"BOOTEFI_NAME"; then " \
+ "efi/fedora/"BOOTEFI_NAME"; then " \
"echo Found EFI removable media binary " \
- "efi/boot/"BOOTEFI_NAME"; " \
+ "efi/fedora/"BOOTEFI_NAME"; " \
"run boot_efi_binary; " \
"echo EFI LOAD FAILED: continuing...; " \
"fi; " \
--
2.12.2
2.13.0