All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] configs/beaglev: enable building of low-level firmware
@ 2021-05-07 21:40 Yann E. MORIN
  0 siblings, 0 replies; only message in thread
From: Yann E. MORIN @ 2021-05-07 21:40 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=671423d33e301c1c6e9186926a22980bb7597440
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This commit extends the beaglev_defconfig and its documentation to
build the low-level firmware, and to explain how to reflash it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[yann.morin.1998 at free.fr: use typoed-name for beaglev-ddrlnit]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 board/beaglev/readme.txt  | 38 ++++++++++++++++++++++++++++++++++++--
 configs/beaglev_defconfig |  2 ++
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/board/beaglev/readme.txt b/board/beaglev/readme.txt
index d8511d3fd1..bbdb9b12ef 100644
--- a/board/beaglev/readme.txt
+++ b/board/beaglev/readme.txt
@@ -17,6 +17,8 @@ Build results
 
 After building, output/images contains:
 
++ bootloader-BEAGLEV-buildroot.bin.out
++ ddrinit-2133-buildroot.bin.out
 + Image
 + fw_payload.bin
 + fw_payload.bin.out
@@ -26,7 +28,11 @@ After building, output/images contains:
 + sdcard.img
 + u-boot.bin
 
-The two important files are:
+The four important files are:
+
+ - bootloader-BEAGLEV-buildroot.bin.out, the first stage bootloader
+
+ - ddrinit-2133-buildroot.bin.out, the DDR initialization firmware
 
  - fw_payload.bin.out, which is the bootloader image, containing
    both OpenSBI and U-Boot.
@@ -51,7 +57,7 @@ Insert your SD card.
 
 Power-up the board using an USB-C cable.
 
-Flashing the bootloader
+Flashing OpenSBI/U-Boot
 =======================
 
 The bootloader pre-flashed on the Beagle-V has a non-working
@@ -86,3 +92,31 @@ fw_payload.bin.out using the Xmodem protocol.
 
 After reflashing is complete, restart the board, it will automatically
 start the system from the SD card, and reach the login prompt.
+
+Flashing low-level bootloaders
+==============================
+
+The BeagleV comes pre-flashed with functional low-level bootloaders
+(called "secondboot" and "ddrinit"). Re-flashing them is not necessary
+to use this Buildroot defconfig. However, for the sake of
+completeness, Buildroot builds and provides those low-level bootloader
+images.
+
+You can flash them as follows:
+
+ - In the same "pre-loader" menu as the one used above, instead of
+   entering 0 or 1, enter the magic "root at s5t" string. This enters the
+   "expert" features.
+
+ - Then, press 0 and send over X-modem the
+   bootloader-BEAGLEV-buildroot.bin.out file.
+
+ - Then, press 1 and send over X-modem the
+   ddrinit-2133-buildroot.bin.out.
+
+Note that the reflashing mechanism itself relies on those low-level
+bootloaders, so if you flash non-working versions, you'll have to go
+through a recovery process. This requires wiring up to a separate
+debug UART, which pins are located near the HDMI connector. See
+https://wiki.seeedstudio.com/BeagleV-Update-bootloader-ddr-init-boot-uboot-Recover-bootloader/
+section "Recover the bootloader" for more details.
diff --git a/configs/beaglev_defconfig b/configs/beaglev_defconfig
index e94c4ab639..59051e7a6d 100644
--- a/configs/beaglev_defconfig
+++ b/configs/beaglev_defconfig
@@ -18,6 +18,8 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_BEAGLEV_DDRLNIT=y
+BR2_TARGET_BEAGLEV_SECONDBOOT=y
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
 # HEAD of the Fedora branch

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-07 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07 21:40 [Buildroot] [git commit] configs/beaglev: enable building of low-level firmware Yann E. MORIN

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.