BeagleV-Ahead: Upstream Roadmap

Hi, yesterday I received my BeagleV and am happily starting playing around with it and getting it integrated into my Yocto builds :slight_smile:
However, I am wondering about the upstream roadmap for the most basic patches/forkes. Is there already something available? I would particularly be interested if work is already ongoing in opensbi, u-boot and specifically, what are the plans with the external toolchain? Is there already work happening on getting those modifications integrated into the official tools and dependencies? Because that will really help to simplify my Yocto setups.

@DrewFustini just submitted the base device tree for mainline, he just got eMMC working a few mintues ago… [PATCH 0/3] riscv: Add BeagleV Ahead board support

Regards,

A post was split to a new topic: BeagleV-Ahead buntu

Awesome! Great to see that!

Is it possible to give a little bit of insight what is needed to get away from the external toolchain? For me it is the most opaque topic here.

Thead Vector macros in opensbi, uboot and kernel. These could be patched out with .word macros, but I’ll leave that up to a gcc/binutils developer… In the revos GitHub, they did the kernel macro already, so I’ll pull that in…

1 Like

For the purposes of running the upstream kernel, I am just using standard gcc 12:

pdp7@x1:~/dev/ahead/xuantie-ubuntu/linux$ riscv64-linux-gnu-gcc --version
riscv64-linux-gnu-gcc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

To build 6.5-rc3 with my patchset.

pdp7@x1:~/dev/ahead/xuantie-ubuntu/linux$ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- -j8

pdp7@x1:~/dev/ahead/xuantie-ubuntu/linux$ cp arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dtb ../deploy/light-beagle.dtb
pdp7@x1:~/dev/ahead/xuantie-ubuntu/linux$ cp arch/riscv/boot/Image ../deploy/

I’m also using upstream OpenSBI:

pdp7@x1:~/dev/ahead/xuantie-ubuntu/opensbi$ git log  --oneline -2
0ad866067d78 (HEAD -> master, upstream/master, upstream) lib: sbi: Map/Unmap debug console shared memory buffers
6e44ef686a9b lib: sbi: Add functions to map/unmap shared memory

I do still use the t-head toolchain and t-head uboot as structured in Robert’s xuantie-ubuntu repo.

Roadmap: I now Linux 6.5-rc2 booting from eMMC with some changes I’ve made to the eMMC drivers and device tree. I’m working on an RFC patch series now. Jisheng Zheng is the original author of the driver so I’m sure he will have ideas about how to fully support all the functionality like DMA and runtime power management.

1 Like

OKay, the vendor kernel has those vector extension patched out now:

It should build with mainline gcc now…

That just leaves, two vendor projects that need patches, for the vendor software stack

Vendor: u-boot
Vendor: OpenSBi

For the purposes of mainline only…

That just leaves vendor u-boot…

Regards,

1 Like

Hey @cordlandwehr have you started with the yocto work in meta-riscv to add this ? if so please share somewhere, there are few folks who might be interested as well. I think we can carry needed patches to begin with. but toolchain forks are a bit too much to carry, so I would expect that we can start with core pieces from upstream ( yocto ) and tweak the BSP bits as needed.

Hi @khem , I did not really find the time to start (yet). Just asked the questions and then went on vacations :wink: But if I do not see any draft MR until next/second next week, I might find time to work on meta-riscv side.
Just to understand you right regarding the u-boot /w external toolchain situation (and if I see correctly, the Kernel commits to port away from the toolchain got reverted), how would an initial setup look like? Adding machine config etc. to meta-riscv and build from within the beagle-v Yocto setup (and thus using the external toolchain for Kernel + uboot) or would porting both away from the toolchain the first mandatory step?