From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, samuel@sholland.org
Subject: [Buildroot] [PATCH 1/2] boot/sun20i-d1-spl: new package
Date: Fri, 5 Nov 2021 13:38:46 +0100 [thread overview]
Message-ID: <20211105123848.6356-1-peter@korsgaard.com> (raw)
U-Boot does not yet have SPL code to initialize the DDR controller on the
Allwinner D1 - So instead package the sun20i-d1-spl bootloader, which is
based on boot0 from the Allwinner BSP with some modifications to build it
separately from the BSP and boot mainline U-Boot as explained on the
linux-sunxi wiki:
https://linux-sunxi.org/Allwinner_Nezha
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
DEVELOPERS | 1 +
boot/Config.in | 1 +
boot/sun20i-d1-spl/Config.in | 8 ++++++++
boot/sun20i-d1-spl/sun20i-d1-spl.hash | 2 ++
boot/sun20i-d1-spl/sun20i-d1-spl.mk | 23 +++++++++++++++++++++++
5 files changed, 35 insertions(+)
create mode 100644 boot/sun20i-d1-spl/Config.in
create mode 100644 boot/sun20i-d1-spl/sun20i-d1-spl.hash
create mode 100644 boot/sun20i-d1-spl/sun20i-d1-spl.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 9d0e92b564..c378270bb7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2108,6 +2108,7 @@ F: board/orangepi/
F: board/pandaboard/
F: board/roseapplepi/
F: boot/shim/
+F: boot/sun20i-d1-spl/
F: configs/avenger96_defconfig
F: configs/beagleboneai_defconfig
F: configs/lafrite_defconfig
diff --git a/boot/Config.in b/boot/Config.in
index ff98a49796..40472ae07d 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -20,6 +20,7 @@ source "boot/optee-os/Config.in"
source "boot/opensbi/Config.in"
source "boot/s500-bootloader/Config.in"
source "boot/shim/Config.in"
+source "boot/sun20i-d1-spl/Config.in"
source "boot/syslinux/Config.in"
source "boot/uboot/Config.in"
source "boot/vexpress-firmware/Config.in"
diff --git a/boot/sun20i-d1-spl/Config.in b/boot/sun20i-d1-spl/Config.in
new file mode 100644
index 0000000000..9d94d87b1c
--- /dev/null
+++ b/boot/sun20i-d1-spl/Config.in
@@ -0,0 +1,8 @@
+config BR2_TARGET_SUN20I_D1_SPL
+ bool "sun20-d1-spl"
+ depends on BR2_RISCV_64
+ help
+ Allwinner D1 boot0 code with modifications to use as U-Boot
+ SPL.
+
+ https://github.com/smaeul/sun20i_d1_spl
diff --git a/boot/sun20i-d1-spl/sun20i-d1-spl.hash b/boot/sun20i-d1-spl/sun20i-d1-spl.hash
new file mode 100644
index 0000000000..6ca60e5278
--- /dev/null
+++ b/boot/sun20i-d1-spl/sun20i-d1-spl.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 69063601239a7254fb72e486b138d88a6f2b5c645b24cdfe9792123f975d4a8f sun20i-d1-spl-771192d0b3737798d7feca87263c8fa74a449787.tar.gz
diff --git a/boot/sun20i-d1-spl/sun20i-d1-spl.mk b/boot/sun20i-d1-spl/sun20i-d1-spl.mk
new file mode 100644
index 0000000000..2462ce2322
--- /dev/null
+++ b/boot/sun20i-d1-spl/sun20i-d1-spl.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# sun20i-d1-spl
+#
+################################################################################
+
+# Commit on the 'mainline' branch
+SUN20I_D1_SPL_VERSION = 771192d0b3737798d7feca87263c8fa74a449787
+SUN20I_D1_SPL_SITE = $(call github,smaeul,sun20i_d1_spl,$(SUN20I_D1_SPL_VERSION))
+SUN20I_D1_SPL_INSTALL_TARGET = NO
+SUN20I_D1_SPL_INSTALL_IMAGES = YES
+SUN20I_D1_SPL_LICENSE = GPL-2.0+
+
+define SUN20I_D1_SPL_BUILD_CMDS
+ $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)" p=sun20iw1p1 mmc
+endef
+
+define SUN20I_D1_SPL_INSTALL_IMAGES_CMDS
+ $(INSTALL) -D -m 0644 $(@D)/nboot/boot0_sdcard_sun20iw1p1.bin \
+ $(BINARIES_DIR)/boot0_sdcard_sun20iw1p1.bin
+endef
+
+$(eval $(generic-package))
--
2.20.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2021-11-05 12:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 12:38 Peter Korsgaard [this message]
2021-11-05 12:38 ` [Buildroot] [PATCH 2/2] configs/nezha_defconfig: new defconfig Peter Korsgaard
2021-11-05 13:10 ` Thomas Petazzoni
2021-11-05 13:26 ` Peter Korsgaard
2021-11-05 13:28 ` Giulio Benetti
2021-11-05 13:35 ` Peter Korsgaard
2021-11-05 13:52 ` Giulio Benetti
2021-11-05 14:30 ` Peter Korsgaard
2021-11-07 0:49 ` Giulio Benetti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211105123848.6356-1-peter@korsgaard.com \
--to=peter@korsgaard.com \
--cc=buildroot@buildroot.org \
--cc=samuel@sholland.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.