[PATCH v5 3/3] board: qemu-riscv: enable semihosting

Kautuk Consul kconsul at ventanamicro.com
Wed Dec 7 12:47:01 CET 2022


Hi Leo,

Thanks! I have sent a v6 of this patchset wherein I have rebased the
patchset on the
latest master. I have removed the last patch with default config
options for qemu-riscv64
targets and have replaced it with a patch with Sean's suggestion for
adding to the
dependencies.

Thanks again.

On Wed, Dec 7, 2022 at 12:31 PM Leo Liang <ycliang at andestech.com> wrote:
>
> Hi Kautuk,
>
> On Tue, Dec 06, 2022 at 05:02:49PM +0530, Kautuk Consul wrote:
> > Hi Leo,
> >
> > On Tue, Dec 6, 2022 at 4:29 PM Leo Liang <ycliang at andestech.com> wrote:
> > >
> > > Hi Kautuk,
> > >
> > > We have tested your patchset with QEMU 7.1.0.
> > > It generally looks fine, but CI error seems to persist.
> > > https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/14314
> > >
> > > The error comes from CI testcase timed-out.
> > > The reason for the time-out is not yet confirmed,
> > > but we suspect it's because when executing under semihosting,
> > > QEMU could not exit normally. (thru ctrl+x a)
> > >
> > > There is a seemingly relevent patchset that sits on QEMU mailing list for some time.
> > > https://lore.kernel.org/all/20220620190834.GA16887@ws2101.lin.mbt.kalray.eu/T/#m1bc32cc32511b6ac8adfaf67983dc2bccd4b9ec9
> > >
> > > On the u-boot side, what do you think if we disable semihosting by default?
> > > (i.e., not adding CONFIG_SEMIHOSTING_XXX in qemu's defconfig)
> >
> > I think it is okay to disable semihosting by default. Then the user
> > will configure it when needed.
> > So then can you ACK the first 2 patches ? I think we can leave out the
> > 3rd qemu config patch for now.
> >
>
> No problem!
> Additionally, could you rebase the patchset to current master,
> add what Sean suggested, and then send again?
> I think I could merge your patch as soon as you re-send it.
>
> Best regards,
> Leo
>
> > >
> > > Best regards,
> > > Leo
> > >
> > > On Tue, Dec 06, 2022 at 11:12:41AM +0530, Kautuk Consul wrote:
> > > > Hi,
> > > >
> > > > On Mon, Dec 5, 2022 at 8:46 PM Sean Anderson <sean.anderson at seco.com> wrote:
> > > > >
> > > > > On 12/5/22 00:51, Kautuk Consul wrote:
> > > > > > Hi,
> > > > > >
> > > > > > On Sat, Dec 3, 2022 at 9:44 AM Bin Meng <bmeng.cn at gmail.com> wrote:
> > > > > >>
> > > > > >> On Fri, Sep 23, 2022 at 3:03 PM Kautuk Consul <kconsul at ventanamicro.com> wrote:
> > > > > >> >
> > > > > >> > To enable semihosting we also need to enable the following
> > > > > >> > configs in defconfigs:
> > > > > >> > CONFIG_SEMIHOSTING
> > > > > >> > CONFIG_SPL_SEMIHOSTING
> > > > > >> > CONFIG_SEMIHOSTING_SERIAL
> > > > > >> > CONFIG_SERIAL_PROBE_ALL
> > > > > >> > CONFIG_SPL_FS_EXT4
> > > > > >> > CONFIG_SPL_FS_FAT
> > > > > >>
> > > > > >> Why should these _SPL_FS_xxx be required? If it's required by
> > > > > >> SEMIHOSTING, could the dependency be fixed there?
> > > > > >
> > > > > > The build dependencies require that these options be there.
> > > > >
> > > > > What error do you get?
> > > >
> > > > If I disable both the _SPL_FS_* config options then I get the
> > > > following compilation error:
> > > > common/spl/spl_semihosting.c: In function 'spl_smh_load_image':
> > > > common/spl/spl_semihosting.c:27:32: error:
> > > > 'CONFIG_SPL_FS_LOAD_PAYLOAD_NAME' undeclared (first use in this
> > > > function)
> > > >    27 |         const char *filename = CONFIG_SPL_FS_LOAD_PAYLOAD_NAME;
> > > >       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > common/spl/spl_semihosting.c:27:32: note: each undeclared identifier
> > > > is reported only once for each function it appears in
> > > >
> > > > Bin/Sean: This error is not really related to the semihosting feature
> > > > but is related to COFIG_SPL in general.
> > > > Can you please accept this patch-set and then I'll try and find time
> > > > in the future maybe to rectify this build dependency
> > > > problem ?
> > > >
> > > > >
> > > > > --Sean
> > > > >
> > > > > >>
> > > > > >> >
> > > > > >> > Signed-off-by: Kautuk Consul <kconsul at ventanamicro.com>
> > > > > >> > ---
> > > > > >> >  configs/qemu-riscv32_defconfig       | 4 ++++
> > > > > >> >  configs/qemu-riscv32_smode_defconfig | 4 ++++
> > > > > >> >  configs/qemu-riscv32_spl_defconfig   | 7 +++++++
> > > > > >> >  configs/qemu-riscv64_defconfig       | 4 ++++
> > > > > >> >  configs/qemu-riscv64_smode_defconfig | 4 ++++
> > > > > >> >  configs/qemu-riscv64_spl_defconfig   | 7 +++++++
> > > > > >> >  6 files changed, 30 insertions(+)
> > > > > >> >
> > > > > >>
> > > > > >> Regards,
> > > > > >> Bin
> > > > >


More information about the U-Boot mailing list