Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
From 4796a1eacc6a5ccb623e7d2e46a5196f8335e496 Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Fri, 11 Aug 2023 11:19:49 +0300
|
||||
Subject: [PATCH] Allow access to low addresses with gcc 12
|
||||
|
||||
gcc 12 added a warning that triggers on access to low addresses. Add a
|
||||
compile option that allows access to lower addresses.
|
||||
|
||||
Add the 'cc_option' macro to avoid the compile option when the compiler
|
||||
does not support it.
|
||||
|
||||
This fixes build with TF-A. TF-A added a similar fix in commit
|
||||
dea23e245fb89.
|
||||
|
||||
See some more details in
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
|
||||
|
||||
Upstream: https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/42
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Makefile | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 3f0dd89a7381..045284c30cbc 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -108,6 +108,10 @@ MV_DDR_VER_CSRC = mv_ddr_build_message.c
|
||||
# create mv_ddr build message and version string source file
|
||||
$(shell $(MV_DDR_ROOT)/scripts/localversion.sh $(MV_DDR_ROOT) $(MV_DDR_VER_CSRC) 2> /dev/null)
|
||||
|
||||
+define cc_option
|
||||
+ $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null >/dev/null 2>&1; then echo $(1); fi )
|
||||
+endef
|
||||
+
|
||||
# ******************
|
||||
# U-BOOT SPL SUPPORT
|
||||
# ******************
|
||||
@@ -331,6 +335,7 @@ OBJ_DIR ?= $(MV_DDR_ROOT)
|
||||
CFLAGS = -DMV_DDR_ATF -DCONFIG_DDR4
|
||||
CFLAGS += -Wall -Werror -Os -ffreestanding -mlittle-endian -g -gdwarf-2 -nostdinc
|
||||
CFLAGS += -march=armv8-a -fpie
|
||||
+CFLAGS += $(call cc_option, --param=min-pagesize=0)
|
||||
|
||||
# PLATFORM is set in ble/ble.mk
|
||||
ifneq ($(findstring a80x0,$(PLATFORM)),)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 53e34e3bff26fcbb7cc14178fa9fc80e7a73d556 Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Tue, 11 Oct 2022 16:34:44 +0300
|
||||
Subject: [PATCH] Makefile: disable stack protection
|
||||
|
||||
The Buildroot toolchain might enable stack protection by default. That
|
||||
breaks linking because ATF does not provide the required __stack_chk
|
||||
routines.
|
||||
|
||||
The mv-ddr-marvell Makefile provides no way to add custom CFLAGS. Patch
|
||||
Makefile to disable stack protection.
|
||||
|
||||
Upstream: not applicable; Buildroot specific
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Makefile | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 045284c30cbc..9641354bcf86 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -336,6 +336,7 @@ CFLAGS = -DMV_DDR_ATF -DCONFIG_DDR4
|
||||
CFLAGS += -Wall -Werror -Os -ffreestanding -mlittle-endian -g -gdwarf-2 -nostdinc
|
||||
CFLAGS += -march=armv8-a -fpie
|
||||
CFLAGS += $(call cc_option, --param=min-pagesize=0)
|
||||
+CFLAGS += -fno-stack-protector
|
||||
|
||||
# PLATFORM is set in ble/ble.mk
|
||||
ifneq ($(findstring a80x0,$(PLATFORM)),)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
10
boot/mv-ddr-marvell/Config.in
Normal file
10
boot/mv-ddr-marvell/Config.in
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_TARGET_MV_DDR_MARVELL
|
||||
bool "mv-ddr-marvell"
|
||||
depends on BR2_aarch64
|
||||
help
|
||||
Marvell keeps algorithms for DDR training in a separate
|
||||
repository. This code is not built separately, it is needed
|
||||
as a dependency to build ATF firmware for Marvell Armada 7040
|
||||
and 8040 SoCs.
|
||||
|
||||
https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/
|
||||
3
boot/mv-ddr-marvell/mv-ddr-marvell.hash
Normal file
3
boot/mv-ddr-marvell/mv-ddr-marvell.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 16f02232e21a15979b3d9971e28f7e59562484a5c1f99c2b28c248a3b76a63fa mv-ddr-marvell-d5acc10c287e40cc2feeb28710b92e45c93c702c.tar.gz
|
||||
sha256 907a03943ca940790e97620aca8d46b5b04c653dcf2ab6c66a25238b60cf5635 ddr3_init.c
|
||||
13
boot/mv-ddr-marvell/mv-ddr-marvell.mk
Normal file
13
boot/mv-ddr-marvell/mv-ddr-marvell.mk
Normal file
@@ -0,0 +1,13 @@
|
||||
################################################################################
|
||||
#
|
||||
# mv-ddr-marvell
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# This is the latest commit on mv-ddr-devel as of 20220529
|
||||
MV_DDR_MARVELL_VERSION = d5acc10c287e40cc2feeb28710b92e45c93c702c
|
||||
MV_DDR_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(MV_DDR_MARVELL_VERSION))
|
||||
MV_DDR_MARVELL_LICENSE = GPL-2.0+ or LGPL-2.1 with freertos-exception-2.0, BSD-3-Clause, Marvell Commercial
|
||||
MV_DDR_MARVELL_LICENSE_FILES = ddr3_init.c
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user