boot0: Remove obsolete boot0 package

This commit is contained in:
Andreas Cord-Landwehr
2022-12-20 16:36:28 +01:00
committed by Khem Raj
parent 36ec45a694
commit 05a629193a
5 changed files with 0 additions and 167 deletions

View File

@@ -50,9 +50,6 @@ UBOOT_DTB_LOADADDRESS = "0x4FA00000"
UBOOT_DTB = "1"
UBOOT_DTB_BINARY ?= "sun20i-d1-nezha.dtb"
# Deploy boot0 which is used as SPL
EXTRA_IMAGEDEPENDS += "boot0"
## wic default support
WKS_FILE_DEPENDS ?= " \
u-boot-nezha \

View File

@@ -1,33 +0,0 @@
DESCRIPTION = "Mainline friendly Secondary Program Loader for Allwinner D1"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI = " \
git://github.com/smaeul/sun20i_d1_spl;protocol=https;branch=mainline \
file://0001-config.mk-Allow-overriding-CC-and-other-tools.patch \
file://0002-config.mk-Remove-nostdinc.patch \
file://0003-riscv-fix-build-with-binutils-2.38.patch \
"
PV = "1.0+git${SRCPV}"
SRCREV = "0ad88bfdb723b1ac74cca96122918f885a4781ac"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "p=sun20iw1p1 mmc"
inherit deploy
do_compile () {
unset LDFLAGS
oe_runmake
}
do_deploy() {
install -m 644 ${S}/nboot/boot0_sdcard_sun20iw1p1.bin ${DEPLOYDIR}
}
addtask deploy before do_build after do_compile
COMPATIBLE_MACHINE = "nezha-allwinner-d1"

View File

@@ -1,49 +0,0 @@
From cef8a54a2199385b424a6d3a17d081dd4bf3c8ba Mon Sep 17 00:00:00 2001
From: Cezary Sobczak <cezary.sobczak@3mdeb.com>
Date: Tue, 29 Mar 2022 21:54:10 +0200
Subject: [PATCH 1/4] config.mk: Allow overriding CC and other tools
It helps build systems defaults to be used e.g. OE's default CC has
additional bits which are needed for regular functioning of the cross
compiler.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
---
mk/config.mk | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/mk/config.mk b/mk/config.mk
index 98abfd1fe2f5..3b8a1b1de9c6 100644
--- a/mk/config.mk
+++ b/mk/config.mk
@@ -6,16 +6,16 @@ ifneq ($(SKIP_AUTO_CONF),yes)
sinclude $(TOPDIR)/autoconf.mk
endif
-AS = $(CROSS_COMPILE)as
-LD = $(CROSS_COMPILE)ld
-CC = $(CROSS_COMPILE)gcc
-CPP = $(CC) -E
-AR = $(CROSS_COMPILE)ar
-NM = $(CROSS_COMPILE)nm
-LDR = $(CROSS_COMPILE)ldr
-STRIP = $(CROSS_COMPILE)strip
-OBJCOPY = $(CROSS_COMPILE)objcopy
-OBJDUMP = $(CROSS_COMPILE)objdump
+AS ?= $(CROSS_COMPILE)as
+LD ?= $(CROSS_COMPILE)ld
+CC ?= $(CROSS_COMPILE)gcc
+CPP ?= $(CC) -E
+AR ?= $(CROSS_COMPILE)ar
+NM ?= $(CROSS_COMPILE)nm
+LDR ?= $(CROSS_COMPILE)ldr
+STRIP ?= $(CROSS_COMPILE)strip
+OBJCOPY ?= $(CROSS_COMPILE)objcopy
+OBJDUMP ?= $(CROSS_COMPILE)objdump
##########################################################
ifeq (x$(CPU), xriscv64)
--
2.25.1

View File

@@ -1,31 +0,0 @@
From b25fe9956031b5e5ff901d7853e05fe35f1b8b5b Mon Sep 17 00:00:00 2001
From: Cezary Sobczak <cezary.sobczak@3mdeb.com>
Date: Tue, 29 Mar 2022 21:56:00 +0200
Subject: [PATCH 2/4] config.mk: Remove -nostdinc
This helps building on different kind of toolchains e.g. OE/Yocto where
the standard install paths may vary and this is better to avoid to have
to poke into system to find headers etc.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
---
mk/config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/config.mk b/mk/config.mk
index 3b8a1b1de9c6..75098cf32ea6 100644
--- a/mk/config.mk
+++ b/mk/config.mk
@@ -30,7 +30,7 @@ SPLINCLUDE := \
-I$(SRCTREE)/include/arch/$(PLATFORM)/ \
-I$(SRCTREE)/include/openssl/
- COMM_FLAGS := -nostdinc $(COMPILEINC) \
+ COMM_FLAGS := $(COMPILEINC) \
-g -Os -fno-common \
-ffunction-sections \
-fno-builtin -ffreestanding \
--
2.25.1

View File

@@ -1,51 +0,0 @@
From 7ab3906f6b986923bb0d94434284163014861d70 Mon Sep 17 00:00:00 2001
From: Cezary Sobczak <cezary.sobczak@3mdeb.com>
Date: Tue, 29 Mar 2022 21:57:54 +0200
Subject: [PATCH 4/4] riscv: fix build with binutils 2.38
From version 2.38, binutils default to ISA spec version 20191213. This
means that the csr read/write (csrr*/csrw*) instructions and fence.i
instruction has separated from the `I` extension, become two standalone
extensions: Zicsr and Zifencei.
The fix is to specify those extensions explicitely in -march. However as
older binutils version do not support this, we first need to detect
that.
Fixes:
mmu.c: Assembler messages:
mmu.c:85: Error: unrecognized opcode `fence.i'
Signed-off-by: Cezary Sobczak <cezary.sobczak@3mdeb.com>
---
mk/config.mk | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/mk/config.mk b/mk/config.mk
index 72ecbf58abab..4bd54b254814 100644
--- a/mk/config.mk
+++ b/mk/config.mk
@@ -85,10 +85,18 @@ SPLINCLUDE := \
COMM_FLAGS += -mno-unaligned-access
endif
+# Newer binutils versions default to ISA spec version 20191213 which moves some
+# instructions from the I extension to the Zicsr and Zifencei extensions.
+toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(MARCH)_zicsr_zifencei)
+zicsr_zifencei-$(toolchain-need-zicsr-zifencei) := _zicsr_zifencei
+RISCV_MARCH := $(MARCH)_zicsr_zifencei
+
+ARCH_FLAGS = -march=$(RISCV_MARCH) -mabi=$(MABI)
+
SPLINCLUDE += -I$(SRCTREE)/libfdt
-C_FLAGS += $(SPLINCLUDE) $(COMM_FLAGS)
-S_FLAGS += $(SPLINCLUDE) -D__ASSEMBLY__ $(COMM_FLAGS)
+C_FLAGS += $(SPLINCLUDE) $(COMM_FLAGS) $(ARCH_FLAGS)
+S_FLAGS += $(SPLINCLUDE) -D__ASSEMBLY__ $(COMM_FLAGS) $(ARCH_FLAGS)
LDFLAGS_GC += --gc-sections
#LDFLAGS += --gap-fill=0xff
export LDFLAGS_GC
--
2.25.1