[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Near-upstream kernel for VisionFive2



On Wed, 25 Oct 2023 at 19:50, Baptiste Jonglez
<baptiste@bitsofnetworks.org> wrote:
>
> Hello Pratham,
>
> On 25-10-23, Pratham Patel wrote:
> > On Wed, 25 Oct 2023 at 16:33, Baptiste Jonglez
> > <baptiste@bitsofnetworks.org> wrote:
> > > We're trying to build a system that is as close as possible to upstream
> > > for the VisionFive2.  Here "upstream" means both Debian and Linux kernel.
> > >
> > > The current progress is here: https://framagit.org/compile-farm/debian-risc-v-build
> > >
> > > The main blockers right now are NVMe and networking.  Did anybody have
> > > success with these with a reasonable kernel config?
> >
> > The PCIe patches for the VisionFive2 are not merged yet[0]. Therefore,
> > the NVMe drive not working at the moment is expected.
>
> I'm using the development branch from the starfive repository (currently
> 91 patches on top of upstream 6.5.0 kernel).  It does include patches that
> add PCIe support.

Cool.

> I just tested another NVMe drive and this time it's correctly detected, so
> it might be a compatibility issue.

You might want to check the kernel logs with `dmesg` if you think that
the previously used NVMe drive is faulty.

> > As for the networking, I am unsure why it isn't working. As the first
> > step of troubleshooting, can you make sure that `CONFIG_DWMAC_STARFIVE`
> > is enabled?
>
> It does, I'm using the same config as the Debian kernel + a few custom
> config items, see here:
>
>   https://framagit.org/compile-farm/debian-risc-v-build

I did check the repository, and it indeed has
`CONFIG_DWMAC_STARFIVE=m` but my question being that sometimes Kbuild
will "restart" config or that `make oldconfig`/`make olddefconfig`
unset `CONFIG_DWMAC_STARFIVE`. To see what really got built, the
configuration file either _after the build_ or in the `.deb` package
is the only thing that I would trust.

If you do a `make bindeb-pkg`, it will do a `make olddefconfig`[0]
before building other targets. Taking a detour to cite my argument, it
appears that this was removed[1] after 6.5.0.

[0]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/scripts/package/mkdebian?h=v6.5.9&id=d55571c0084465f1f7e1e29f22bd910d366a6e1d#n279
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/package/mkdebian?h=v6.6-rc7&id=d9287ea8ffc9be2ab4c81c32e1ca54478425ba38

I'm also in the middle of creating an image as we speak, with 100%
upstream code. (Although, with Arch Linux.) I will report back with my
findings. Might take a long time, building on the VF2 is quite slow :)

> The link is visible and goes up, but packets don't go through.
>
> Baptiste


Reply to: