All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anup Patel <anup@brainfault.org>
To: Troy Benjegerdes <troy.benjegerdes@sifive.com>
Cc: Loys Ollivier <lollivier@baylibre.com>,
	Atish Patra <atish.patra@wdc.com>,
	Karsten Merker <merker@debian.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>
Subject: Re: Testing the recent RISC-V DT patchsets
Date: Tue, 4 Jun 2019 11:42:15 +0530	[thread overview]
Message-ID: <CAAhSdy3qgqdz+XPsBWZSfYZhMTA2Py+M9OuD=K1Yo=yDwwdJkQ@mail.gmail.com> (raw)
In-Reply-To: <038A3CC1-B970-4B1B-83C1-59992F609888@sifive.com>

On Tue, Jun 4, 2019 at 1:47 AM Troy Benjegerdes
<troy.benjegerdes@sifive.com> wrote:
>
>
>
> > On Jun 3, 2019, at 4:49 AM, Loys Ollivier <lollivier@baylibre.com> wrote:
> >
> > On Wed 29 May 2019 at 12:25, Troy Benjegerdes <troy.benjegerdes@sifive.com> wrote:
> >
> >>> On May 29, 2019, at 5:04 AM, Loys Ollivier <lollivier@baylibre.com> wrote:
> >>>
> >>> On Wed 29 May 2019 at 00:50, Atish Patra <atish.patra@wdc.com> wrote:
> >>>
> >>>> On 5/28/19 8:36 AM, Karsten Merker wrote:
> >>>>> On Tue, May 28, 2019 at 05:10:42PM +0200, Loys Ollivier wrote:
> >>>>>> On Tue 28 May 2019 at 01:32, Paul Walmsley <paul.walmsley@sifive.com> wrote:
> >>>>>>
> >>>>>>> An update for those testing RISC-V patches: here's a new branch of
> >>>>>>> riscv-pk/bbl that doesn't try to read or modify the DT data at all, which
> >>>>>>> should be useful until U-Boot settles down.
> >>>>> [...]
> >>>>>>> Here is an Linux kernel branch with updated DT data that can be booted
> >>>>>>> with the above bootloader:
> >>>>>>>
> >>>>>>>   https://github.com/sifive/riscv-linux/tree/dev/paulw/dts-v5.2-rc1-experimental
> >>>>>>>
> >>>>>>> A sample boot log follows, using a 'defconfig' build from that branch.
> >>>>>>
> >>>>>> Thanks Paul, I can confirm that it works.
> >>>>>>
> >>>>>> Something is still unclear to myself.
> >>>>>> Using FSBL + riscv-pk/bbl the linux kernel + device tree boots.
> >>>>>> Neither FSBL nor riscv-pk/bbl are modifying the DT.
> >>>>>>
> >>>>>> Using FSBL + OpenSBI + U-Boot the same kernel + device tree hangs on
> >>>>>> running /init.
> >>>>>>
> >>>>>> Would you have any pointer on what riscv-pk does that OpenSBI/U-boot doesn't ?
> >>>>>> Or maybe it is the other way around - OpenSBI/U-boot does something that
> >>>>>> extra that should not happen.
> >>>>>
> >>>>> Hello,
> >>>>>
> >>>>> I don't know which version of OpenSBI you are using, but there is
> >>>>> a problem with the combination of kernel 5.2-rc1 and OpenSBI
> >>>>> versions before commit
> >>>>>
> >>>>>  https://github.com/riscv/opensbi/commit/4e2cd478208531c47343290f15b577d40c82649c
> >>>>>
> >>>>> that can result in a hang on executing init, so in case you
> >>>>> should be using an older OpenSBI build that might be the source
> >>>>> of the problem that you are experiencing.
> >>>>>
> >>>>> Regards,
> >>>>> Karsten
> >>>>>
> >>>>
> >>>> I verified the updated DT with upstream kernel for the boot flow OpenSBI
> >>>> + U-Boot + Linux or OpenSBI + Linux.
> >>>>
> >>>> OpenSBI should be compiled for sifive platform with following additional
> >>>> argument
> >>>>
> >>>> FW_PAYLOAD_FDT_PATH=<linux kernel
> >>>> source>/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dtb
> >>>>
> >>>> FYI: It will only work when kernel is given a payload to U-Boot/OpenSBI
> >>>> directly.
> >>>>
> >>>
> >>> Hum, I am surprised by this statement.
> >>> I was able to verify the latest DT patch serie from Paul with:
> >>> OpenSBI + U-Boot + Linux & DT.
> >>>
> >>> Following the OpenSBI documentation [0] with U-Boot payload:
> >>> FW_PAYLOAD_PATH=<u-boot_build_dir>/u-boot.bin
> >>>
> >>> I get an U-Boot prompt and then I can just load the linux kernel and
> >>> device tree from the network.
> >>>
> >>> [0]: https://github.com/riscv/opensbi/blob/master/docs/platform/sifive_fu540.md#building-sifive-fu540-platform
> >>>
> >>
> >> Could you confirm which git hash of U-boot you are building, and that the .config matches
> >> the defconfig (or send me the .config you used)?
> >
> > Sure,
> >
> > OpenSBI: a6395acd6cb2c35871481d3e4f0beaf449f8c0fd
> > U-Boot: (origin/master) 344a0e4367d0820b8eb2ea4a90132433e038095f
> > Kernel: from Paul from this thread [1]
> >
> > I use the sifive_fu540_defconfig of U-Boot with no additional changes.
> >
> > [1] https://github.com/sifive/riscv-linux/tree/dev/paulw/dts-v5.2-rc1-experimental
> >
> >>
> >> I’d like to get everything that’s working integrated in one place into a freedom-u-sdk test branch.
> >>
> >>
> >
> > Let me know the test branch when it's up :)
> >
> > Loys
>
> Please take a look at https://github.com/tmagik/freedom-u-sdk/tree/functional_test
>
> When I booted the original 4.19 vmlinux.bin, I got this:
>
> Booting kernel in
> 2
> 1
> 0
> ## Starting application at 0x80200000 ...
> [    0.000000] Linux version 4.19.0-sifive-1+ (troyb@epsilon09) (gcc version 8.3.0 (Buildroot 29
> [    0.000000] bootconsole [early0] enabled
>
> With the 5.2 kernel, I get know output, which I assume is expected behavior using the
> current DTS provided by the S-mode Uboot.
>
> Booting kernel in
> 2
> 1
> 0
> ## Starting application at 0x80200000 ...

The earlyprintk support has been removed from latest kernel. Instead of
earlyprintk we now use generic earlycon support.

To use earlycon, just add "earlycon=sbi" parameter in your kernel bootargs.

On U-Boot, kernel bootargs can be changed by changing "bootargs" U-Boot
environment variable.

Regards,
Anup

WARNING: multiple messages have this Message-ID (diff)
From: Anup Patel <anup@brainfault.org>
To: Troy Benjegerdes <troy.benjegerdes@sifive.com>
Cc: Loys Ollivier <lollivier@baylibre.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Atish Patra <atish.patra@wdc.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Karsten Merker <merker@debian.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>
Subject: Re: Testing the recent RISC-V DT patchsets
Date: Tue, 4 Jun 2019 11:42:15 +0530	[thread overview]
Message-ID: <CAAhSdy3qgqdz+XPsBWZSfYZhMTA2Py+M9OuD=K1Yo=yDwwdJkQ@mail.gmail.com> (raw)
In-Reply-To: <038A3CC1-B970-4B1B-83C1-59992F609888@sifive.com>

On Tue, Jun 4, 2019 at 1:47 AM Troy Benjegerdes
<troy.benjegerdes@sifive.com> wrote:
>
>
>
> > On Jun 3, 2019, at 4:49 AM, Loys Ollivier <lollivier@baylibre.com> wrote:
> >
> > On Wed 29 May 2019 at 12:25, Troy Benjegerdes <troy.benjegerdes@sifive.com> wrote:
> >
> >>> On May 29, 2019, at 5:04 AM, Loys Ollivier <lollivier@baylibre.com> wrote:
> >>>
> >>> On Wed 29 May 2019 at 00:50, Atish Patra <atish.patra@wdc.com> wrote:
> >>>
> >>>> On 5/28/19 8:36 AM, Karsten Merker wrote:
> >>>>> On Tue, May 28, 2019 at 05:10:42PM +0200, Loys Ollivier wrote:
> >>>>>> On Tue 28 May 2019 at 01:32, Paul Walmsley <paul.walmsley@sifive.com> wrote:
> >>>>>>
> >>>>>>> An update for those testing RISC-V patches: here's a new branch of
> >>>>>>> riscv-pk/bbl that doesn't try to read or modify the DT data at all, which
> >>>>>>> should be useful until U-Boot settles down.
> >>>>> [...]
> >>>>>>> Here is an Linux kernel branch with updated DT data that can be booted
> >>>>>>> with the above bootloader:
> >>>>>>>
> >>>>>>>   https://github.com/sifive/riscv-linux/tree/dev/paulw/dts-v5.2-rc1-experimental
> >>>>>>>
> >>>>>>> A sample boot log follows, using a 'defconfig' build from that branch.
> >>>>>>
> >>>>>> Thanks Paul, I can confirm that it works.
> >>>>>>
> >>>>>> Something is still unclear to myself.
> >>>>>> Using FSBL + riscv-pk/bbl the linux kernel + device tree boots.
> >>>>>> Neither FSBL nor riscv-pk/bbl are modifying the DT.
> >>>>>>
> >>>>>> Using FSBL + OpenSBI + U-Boot the same kernel + device tree hangs on
> >>>>>> running /init.
> >>>>>>
> >>>>>> Would you have any pointer on what riscv-pk does that OpenSBI/U-boot doesn't ?
> >>>>>> Or maybe it is the other way around - OpenSBI/U-boot does something that
> >>>>>> extra that should not happen.
> >>>>>
> >>>>> Hello,
> >>>>>
> >>>>> I don't know which version of OpenSBI you are using, but there is
> >>>>> a problem with the combination of kernel 5.2-rc1 and OpenSBI
> >>>>> versions before commit
> >>>>>
> >>>>>  https://github.com/riscv/opensbi/commit/4e2cd478208531c47343290f15b577d40c82649c
> >>>>>
> >>>>> that can result in a hang on executing init, so in case you
> >>>>> should be using an older OpenSBI build that might be the source
> >>>>> of the problem that you are experiencing.
> >>>>>
> >>>>> Regards,
> >>>>> Karsten
> >>>>>
> >>>>
> >>>> I verified the updated DT with upstream kernel for the boot flow OpenSBI
> >>>> + U-Boot + Linux or OpenSBI + Linux.
> >>>>
> >>>> OpenSBI should be compiled for sifive platform with following additional
> >>>> argument
> >>>>
> >>>> FW_PAYLOAD_FDT_PATH=<linux kernel
> >>>> source>/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dtb
> >>>>
> >>>> FYI: It will only work when kernel is given a payload to U-Boot/OpenSBI
> >>>> directly.
> >>>>
> >>>
> >>> Hum, I am surprised by this statement.
> >>> I was able to verify the latest DT patch serie from Paul with:
> >>> OpenSBI + U-Boot + Linux & DT.
> >>>
> >>> Following the OpenSBI documentation [0] with U-Boot payload:
> >>> FW_PAYLOAD_PATH=<u-boot_build_dir>/u-boot.bin
> >>>
> >>> I get an U-Boot prompt and then I can just load the linux kernel and
> >>> device tree from the network.
> >>>
> >>> [0]: https://github.com/riscv/opensbi/blob/master/docs/platform/sifive_fu540.md#building-sifive-fu540-platform
> >>>
> >>
> >> Could you confirm which git hash of U-boot you are building, and that the .config matches
> >> the defconfig (or send me the .config you used)?
> >
> > Sure,
> >
> > OpenSBI: a6395acd6cb2c35871481d3e4f0beaf449f8c0fd
> > U-Boot: (origin/master) 344a0e4367d0820b8eb2ea4a90132433e038095f
> > Kernel: from Paul from this thread [1]
> >
> > I use the sifive_fu540_defconfig of U-Boot with no additional changes.
> >
> > [1] https://github.com/sifive/riscv-linux/tree/dev/paulw/dts-v5.2-rc1-experimental
> >
> >>
> >> I’d like to get everything that’s working integrated in one place into a freedom-u-sdk test branch.
> >>
> >>
> >
> > Let me know the test branch when it's up :)
> >
> > Loys
>
> Please take a look at https://github.com/tmagik/freedom-u-sdk/tree/functional_test
>
> When I booted the original 4.19 vmlinux.bin, I got this:
>
> Booting kernel in
> 2
> 1
> 0
> ## Starting application at 0x80200000 ...
> [    0.000000] Linux version 4.19.0-sifive-1+ (troyb@epsilon09) (gcc version 8.3.0 (Buildroot 29
> [    0.000000] bootconsole [early0] enabled
>
> With the 5.2 kernel, I get know output, which I assume is expected behavior using the
> current DTS provided by the S-mode Uboot.
>
> Booting kernel in
> 2
> 1
> 0
> ## Starting application at 0x80200000 ...

The earlyprintk support has been removed from latest kernel. Instead of
earlyprintk we now use generic earlycon support.

To use earlycon, just add "earlycon=sbi" parameter in your kernel bootargs.

On U-Boot, kernel bootargs can be changed by changing "bootargs" U-Boot
environment variable.

Regards,
Anup

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-06-04  6:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23  0:17 Testing the recent RISC-V DT patchsets Paul Walmsley
2019-04-23  0:17 ` Paul Walmsley
2019-05-28  8:32 ` Paul Walmsley
2019-05-28  8:32   ` Paul Walmsley
2019-05-28 15:10   ` Loys Ollivier
2019-05-28 15:10     ` Loys Ollivier
2019-05-28 15:35     ` Karsten Merker
2019-05-28 15:35       ` Karsten Merker
2019-05-29  7:50       ` Atish Patra
2019-05-29  7:50         ` Atish Patra
2019-05-29 10:04         ` Loys Ollivier
2019-05-29 10:04           ` Loys Ollivier
2019-05-29 17:09           ` Atish Patra
2019-05-29 17:09             ` Atish Patra
2019-05-29 17:25           ` Troy Benjegerdes
2019-05-29 17:25             ` Troy Benjegerdes
2019-06-03  9:49             ` Loys Ollivier
2019-06-03  9:49               ` Loys Ollivier
2019-06-03 15:40               ` Troy Benjegerdes
2019-06-03 15:40                 ` Troy Benjegerdes
2019-06-03 20:17               ` Troy Benjegerdes
2019-06-03 20:17                 ` Troy Benjegerdes
2019-06-04  6:12                 ` Anup Patel [this message]
2019-06-04  6:12                   ` Anup Patel
2019-05-29  9:41       ` Loys Ollivier
2019-05-29  9:41         ` Loys Ollivier
2019-05-28 19:38   ` Atish Patra
2019-05-28 19:38     ` Atish Patra

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='CAAhSdy3qgqdz+XPsBWZSfYZhMTA2Py+M9OuD=K1Yo=yDwwdJkQ@mail.gmail.com' \
    --to=anup@brainfault.org \
    --cc=atish.patra@wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lollivier@baylibre.com \
    --cc=merker@debian.org \
    --cc=paul.walmsley@sifive.com \
    --cc=troy.benjegerdes@sifive.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.