[gnome-build-meta/jjardon/pinephone-pro-master] arm-trusted-firmware.bst: Fix compilation with GCC11



commit 0a44f2218a64f3860e419600ddd27a032f60a49b
Author: Javier Jardón <jjardon gnome org>
Date:   Sun Jan 30 18:15:55 2022 +0000

    arm-trusted-firmware.bst: Fix compilation with GCC11

 .../boards/pinephone-pro/arm-trusted-firmware.bst  |  2 ++
 ...ockchip-rk3399-fix-dram-section-placement.patch | 36 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)
---
diff --git a/elements/boards/pinephone-pro/arm-trusted-firmware.bst 
b/elements/boards/pinephone-pro/arm-trusted-firmware.bst
index c8f0a4db3..f1ac0e994 100644
--- a/elements/boards/pinephone-pro/arm-trusted-firmware.bst
+++ b/elements/boards/pinephone-pro/arm-trusted-firmware.bst
@@ -5,6 +5,8 @@ sources:
   url: github:ARM-software/arm-trusted-firmware.git
   track: 22d12c4148c373932a7a81e5d1c59a767e143ac2
   track-tags: false
+- kind: patch
+  path: files/arm-trusted-firmware/0002-fix-rockchip-rk3399-fix-dram-section-placement.patch
 
 build-depends:
 - freedesktop-sdk.bst:bootstrap-import.bst
diff --git a/files/arm-trusted-firmware/0002-fix-rockchip-rk3399-fix-dram-section-placement.patch 
b/files/arm-trusted-firmware/0002-fix-rockchip-rk3399-fix-dram-section-placement.patch
new file mode 100644
index 000000000..75392dcff
--- /dev/null
+++ b/files/arm-trusted-firmware/0002-fix-rockchip-rk3399-fix-dram-section-placement.patch
@@ -0,0 +1,36 @@
+From f943b7c8e292e3aad2fcbdd0a37505f62b3b4c87 Mon Sep 17 00:00:00 2001
+From: Patrick Georgi <pgeorgi google com>
+Date: Wed, 23 Jun 2021 21:34:38 +0200
+Subject: [PATCH] fix(rockchip/rk3399): fix dram section placement
+
+To quote jwerner in T925:
+"The __sramdata in the declaration is a mistake, the correct target
+section for that global needs to be .pmusram.data. This used to be
+in .sram.data once upon a time but then the suspend.c stuff got added
+and required it to be moved to PMUSRAM. I guess they forgot to update
+that part in the declaration and since the old GCC seemed to silently
+prefer the attribute in the definition, nobody noticed."
+
+This fixes building with gcc 11.
+
+fix #T925
+
+Change-Id: I2b91542277c95cf487eaa1344927294d5d1b8f2b
+Signed-off-by: Patrick Georgi <pgeorgi google com>
+---
+ plat/rockchip/rk3399/drivers/dram/dram.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plat/rockchip/rk3399/drivers/dram/dram.h b/plat/rockchip/rk3399/drivers/dram/dram.h
+index 0eb12cf299..5572b16123 100644
+--- a/plat/rockchip/rk3399/drivers/dram/dram.h
++++ b/plat/rockchip/rk3399/drivers/dram/dram.h
+@@ -149,7 +149,7 @@ struct rk3399_sdram_params {
+       uint32_t rx_cal_dqs[2][4];
+ };
+ 
+-extern __sramdata struct rk3399_sdram_params sdram_config;
++extern struct rk3399_sdram_params sdram_config;
+ 
+ void dram_init(void);
+ 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]