summary refs log tree commit diff
path: root/gnu/packages/patches/arm-trusted-firmware-rockchip-disable-binary.patch
blob: 8819a7cfad1290c7ef0a3cf9b1b842c292df31b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From 42383dcf7db5debb9e183c7c5631974a4c2f91ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20M=C3=BCllner?= <christophm30@gmail.com>
Date: Wed, 24 Apr 2019 09:52:54 +0200
Subject: [PATCH 2/2] rockchip: Disable binary generation for all SoCs.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

All supported Rockchip SoCs (RK3288, RK3328, RK3368 and RK3399)
have non-continuous memory areas in the linker script with a huge
gap between them. This results in extremely padded binary images
with a size of about 4 GiB.

E.g. on the RK3399 we have the following memory areas (and base addresses):
RAM (0x1000), SRAM (0xFF8C0000), and PMUSRAM (0xFF3B0000).

Consumers of the TF-A project (e.g. coreboot or U-Boot) therefore
use the ELF image instead, which has a size of a few hundred kBs.

In order to prevent the generation of a huge and useless file,
this patch disables the binary generation for all affected Rockchip
SoCs.

Signed-off-by: Christoph Müllner <christophm30@gmail.com>
Change-Id: I4ac65bdf1e598c3e1a59507897d183aee9a36916
---
 plat/rockchip/rk3328/platform.mk | 2 ++
 plat/rockchip/rk3368/platform.mk | 2 ++
 plat/rockchip/rk3399/platform.mk | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/plat/rockchip/rk3328/platform.mk b/plat/rockchip/rk3328/platform.mk
index 18b1b9419..01c5af6a2 100644
--- a/plat/rockchip/rk3328/platform.mk
+++ b/plat/rockchip/rk3328/platform.mk
@@ -8,6 +8,8 @@ RK_PLAT			:=	plat/rockchip
 RK_PLAT_SOC		:=	${RK_PLAT}/${PLAT}
 RK_PLAT_COMMON		:=	${RK_PLAT}/common
 
+DISABLE_BIN_GENERATION	:=	1
+
 include lib/libfdt/libfdt.mk
 
 PLAT_INCLUDES		:=	-Idrivers/arm/gic/common/			\
diff --git a/plat/rockchip/rk3368/platform.mk b/plat/rockchip/rk3368/platform.mk
index d1315fc58..4ec36ce06 100644
--- a/plat/rockchip/rk3368/platform.mk
+++ b/plat/rockchip/rk3368/platform.mk
@@ -8,6 +8,8 @@ RK_PLAT			:=	plat/rockchip
 RK_PLAT_SOC		:=	${RK_PLAT}/${PLAT}
 RK_PLAT_COMMON		:=	${RK_PLAT}/common
 
+DISABLE_BIN_GENERATION	:=	1
+
 include lib/libfdt/libfdt.mk
 
 PLAT_INCLUDES		:=	-I${RK_PLAT_COMMON}/				\
diff --git a/plat/rockchip/rk3399/platform.mk b/plat/rockchip/rk3399/platform.mk
index 101359856..25c498da8 100644
--- a/plat/rockchip/rk3399/platform.mk
+++ b/plat/rockchip/rk3399/platform.mk
@@ -8,6 +8,8 @@ RK_PLAT		:=	plat/rockchip
 RK_PLAT_SOC	:=	${RK_PLAT}/${PLAT}
 RK_PLAT_COMMON	:=	${RK_PLAT}/common
 
+DISABLE_BIN_GENERATION	:=	1
+
 include lib/libfdt/libfdt.mk
 
 PLAT_INCLUDES		:=	-I${RK_PLAT_COMMON}/			\
-- 
2.20.1