All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yao Zi <me@ziyao.cc>
To: "João Paulo Gonçalves" <jpaulo.silvagoncalves@gmail.com>,
	"Yao Zi" <me@ziyao.cc>
Cc: u-boot@lists.u-boot-project.org, Tom Rini <trini@konsulko.com>,
	Sumit Garg <sumit.garg@kernel.org>,
	Gui-Dong Han <hanguidong02@gmail.com>,
	Joshua Milas <josh.milas@gmail.com>,
	Chen Wang <chen.wang@linux.dev>,
	Inochi Amaoto <inochiama@gmail.com>,
	Lukasz Majewski <lukma@nabladev.com>, Peng Fan <peng.fan@nxp.com>,
	Tim Ouyang <tim609@andestech.com>,
	Leo Liang <leo.liang@sifive.com>,
	Hiago De Franco <hfranco@baylibre.com>,
	Raymond Mao <raymond.mao@riscstar.com>,
	Michal Simek <michal.simek@amd.com>, Yixun Lan <dlan@kernel.org>,
	Andrei Lalaev <andrey.lalaev@gmail.com>,
	E Shattow <e@freeshell.de>, Zhuxu Ran <zhuxu_ran@zohomail.com>
Subject: Re: [PATCH v2 2/2] board: sophgo: Add support for Milk-V Duo S
Date: Sat, 7 Nov 2026 18:32:30 +0000	[thread overview]
Message-ID: <au9uvm_HtLyvI3C1@pie> (raw)
In-Reply-To: <au9f753E44f-BY2T@jpg-duosnb>

On Sat, Nov 07, 2026 at 02:52:13PM -0300, João Paulo Gonçalves wrote:
> Hi Yao Zi,
> 
> > Personally speaking, I prefer to turn on EFI related stuff
> > (BOOTMETH_EFI_BOOTMGR and EFI_PARTITION). Here EFI is more practical
> > since Duo-S carries 512MiB RAM, and I do have a device booted through
> > EFI.
> >
> 
> I will add the EFI configs on v3.
> 
> > > diff --git a/doc/board/sophgo/index.rst b/doc/board/sophgo/index.rst
> > > index 19c9a19b1d4b..61aceafceea3 100644
> > > --- a/doc/board/sophgo/index.rst
> > > +++ b/doc/board/sophgo/index.rst
> > > @@ -7,4 +7,5 @@ Sophgo
> > >  
> > >     milkv_duo
> > >     milkv_duo_256m
> > > +   milkv_duo_s
> > >     licheerv_nano
> > > diff --git a/doc/board/sophgo/milkv_duo_s.rst b/doc/board/sophgo/milkv_duo_s.rst
> > > new file mode 100644
> > > index 000000000000..9f6bf04d1842
> > > --- /dev/null
> > > +++ b/doc/board/sophgo/milkv_duo_s.rst
> > 
> > ...
> > 
> > > +Boot flow
> > > +~~~~~~~~~
> > > +The board boots from a FIP image, fip.bin, which contains the following
> > > +binaries:
> > > +
> > > +- FSBL (First Stage Boot Loader): the vendor bootloader [1]. It serves the
> > > +  same purpose as U-Boot SPL, but U-Boot does not support SPL for this SoC
> > > +  yet, so the vendor FSBL is required.
> > > +- Coprocessor firmware: the vendor firmware (cvirtos.bin) or custom firmware
> > > +  for the C906L coprocessor. It is not needed to boot U-Boot, but it is
> > > +  required by fiptool.
> > 
> > Please confirm whether this is correct. I remembered the coprocessor
> > firmware is optional, too.
> >
> 
> The coprocessor firmware is optional and is not needed to
> boot U-Boot. However, the fiptool from [1] always packs an RTOS image.
> If --rtos is not given, it falls back to a cvirtos.bin that does not
> exist at that path, so it fails:
> 
> $ ./fiptool \
>     --fsbl data/fsbl/cv181x.bin \
>     --ddr_param data/ddr_param.bin \
>     --opensbi fw_dynamic.bin \
>     --uboot u-boot.bin \
>     --text-base $((0x80200020))
> Packing Param1...
> Param1:    0x0
> FSBL:      0x1000
> Packing Param2...
> Traceback (most recent call last):
>   ...
>   File "fiptool/fiptool", line 84, in pack_param2
>     with open(args.rtos, 'rb') as f:
> FileNotFoundError: [Errno 2] No such file or directory: '.../fiptool/cvirtos.bin'
> 
> Passing an empty file does not help either, because the tool always sets
> the coprocessor load address in the FIP header, so the FSBL would still
> try to load and start it.
> 
> The FSBL repository has its own fiptool [2] that can generate fip.bin
> without the coprocessor firmware. When no coprocessor image is packed,
> the FSBL prints "No C906L image." and continues booting. This is also
> how meta-riscv [3] and the vendor Buildroot SDK [4] generate fip.bin,
> so it seems to be the more correct approach.
> 
> If you prefer, I can document this flow instead. In that case the
> documentation also needs to describe how to build the FSBL from source,
> since that fiptool is part of the FSBL build.

Yes, please do so. This sounds clearer.

> [1] https://github.com/sophgo/fiptool
> [2] https://github.com/sophgo/fsbl/blob/sg200x-dev/plat/cv181x/fiptool.py
> [3] https://github.com/riscv/meta-riscv/blob/master/recipes-bsp/milkv-duo-fsbl/milkv-duo-fsbl.bb
> [4] https://github.com/milkv-duo/duo-buildroot-sdk-v2
> 
> > Regards,
> > Yao Zi
> 
> Best Regards,
> João Paulo Gonçalves

-- 
Thanks,
Yao Zi

Meow-mrrp-mrow, I'm a cat.

      reply	other threads:[~2026-11-07 18:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 14:30 [PATCH v2 0/2] board: sophgo: Add support for Milk-V Duo S João Paulo Gonçalves
2026-10-25 14:30 ` [PATCH v2 1/2] clk: sophgo: cv1800b: Add SG2000 compatible string João Paulo Gonçalves
2026-10-25 14:30 ` [PATCH v2 2/2] board: sophgo: Add support for Milk-V Duo S João Paulo Gonçalves
2026-11-04  4:31   ` Yao Zi
2026-11-07 17:52     ` João Paulo Gonçalves
2026-11-07 18:32       ` Yao Zi [this message]

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=au9uvm_HtLyvI3C1@pie \
    --to=me@ziyao.cc \
    --cc=andrey.lalaev@gmail.com \
    --cc=chen.wang@linux.dev \
    --cc=dlan@kernel.org \
    --cc=e@freeshell.de \
    --cc=hanguidong02@gmail.com \
    --cc=hfranco@baylibre.com \
    --cc=inochiama@gmail.com \
    --cc=josh.milas@gmail.com \
    --cc=jpaulo.silvagoncalves@gmail.com \
    --cc=leo.liang@sifive.com \
    --cc=lukma@nabladev.com \
    --cc=michal.simek@amd.com \
    --cc=peng.fan@nxp.com \
    --cc=raymond.mao@riscstar.com \
    --cc=sumit.garg@kernel.org \
    --cc=tim609@andestech.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=zhuxu_ran@zohomail.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.