All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <drew@beagleboard.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 6/6] configs/beaglev: enable building of low-level firmware
Date: Mon, 3 May 2021 00:18:32 -0700	[thread overview]
Message-ID: <20210503071832.GA367228@x1> (raw)
In-Reply-To: <20210502212141.934384-14-thomas.petazzoni@bootlin.com>

On Sun, May 02, 2021 at 11:21:41PM +0200, Thomas Petazzoni wrote:
> This commit extends the beaglev_defconfig and its documentation to
> build the low-level firmware, and explain how to reflash it.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  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..a3adaba3ae 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, whose 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.

This is not something that needs to be noted in the patch, but I wanted
to make people aware that the instructions currently recommed using
SecureCRT as the terminal emulator.  I know many including myself would
not want to use a trial version of commercial software.  

The author of the guide, Lakshantha, told me that he could not transfer
the vic_second_boot.boot.bin using xmodem in minicom when connected via
the debug header.  After he uploaded the file using minicom, he would
type "do 0x18000000", but there would be no response. It did however
work ok in SecureCRT.

Lakshantha will be back on May 6 but in the meantime I would welcome any
suggestions. I figure there must be some difference in the default
behavior of securecrt vs minicom.

thanks,
drew

  reply	other threads:[~2021-05-03  7:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02 21:21 [Buildroot] [PATCH v2 0/6] Support for the BeagleV platform Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 1/6] boot/opensbi: add options to enable/disable image installation Thomas Petazzoni
2021-05-03  0:08   ` Alistair Francis
2021-05-03 11:26   ` Bin Meng
2021-05-02 21:21 ` [Buildroot] [PATCH v2 2/6] configs/beaglev_defconfig: new defconfig Thomas Petazzoni
2021-05-03  0:12   ` Alistair Francis
2021-05-03  1:14   ` Alistair Francis
2021-05-02 21:21 ` [Buildroot] [PATCH v2 3/6] package/riscv64-elf-toolchain: new package Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 4/6] boot/beaglev-ddrinit: " Thomas Petazzoni
2021-05-03 11:30   ` Bin Meng
2021-05-03 11:53     ` Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 5/6] boot/beaglev-secondboot: " Thomas Petazzoni
2021-05-03 11:31   ` Bin Meng
2021-05-02 21:21 ` [Buildroot] [PATCH v2 6/6] configs/beaglev: enable building of low-level firmware Thomas Petazzoni
2021-05-03 11:33   ` Bin Meng
2021-05-02 21:21 ` [Buildroot] [PATCH v2 0/6] Support for the BeagleV platform Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 1/6] boot/opensbi: add options to enable/disable image installation Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 2/6] configs/beaglev_defconfig: new defconfig Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 3/6] package/riscv64-elf-toolchain: new package Thomas Petazzoni
2021-05-03  0:14   ` Alistair Francis
2021-05-03  6:54     ` Thomas Petazzoni
2021-05-03  7:11       ` Alistair Francis
2021-05-03  7:13         ` Thomas Petazzoni
2021-05-03  7:29           ` Alistair Francis
2021-05-03  6:17   ` Peter Korsgaard
2021-05-03  6:57     ` Thomas Petazzoni
2021-05-03  7:09       ` Peter Korsgaard
2021-05-02 21:21 ` [Buildroot] [PATCH v2 4/6] boot/beaglev-ddrinit: " Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 5/6] boot/beaglev-secondboot: " Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 6/6] configs/beaglev: enable building of low-level firmware Thomas Petazzoni
2021-05-03  7:18   ` Drew Fustini [this message]
2021-05-03  7:32     ` Thomas Petazzoni

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=20210503071832.GA367228@x1 \
    --to=drew@beagleboard.org \
    --cc=buildroot@busybox.net \
    /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.