:!: The %%BeagleV%% has been [[https://beaglev.org/blog/2021-07-30-the-future-of-beaglev-community|abandoned]], but future products may use the same %%SoC%% and %%BeagleBoard%%.org are still working on RISC-V boards.
The [[https://beaglev.seeed.cc/|BeagleV]] is a new (as of April 2021) RISC-V based board from [[https://beagleboard.org|BeagleBoard]]. It is being manufactured by [[https://blog.seeedstudio.com/seeed-home-page/seeed-about-us/|Seeed]].
Applications were taken for the [[https://docs.google.com/forms/d/e/1FAIpQLSff2hpW19aiB7SyzA4NK8zhDGgDje26C_z4lpwzJ-Hmk8aJiQ/viewform|initial run of boards]], intended for shipping in March 2021. %%FreeBSD%% developers are now getting boards as of 20210426.
Most of the documentation is [[https://github.com/beagleboard/beaglev-starlight|available here]]; there is also now a [[https://wiki.seeedstudio.com/BeagleV-Getting-Started/|Getting Started]] page.
Here is a //very// [[https://dmesgd.nycbug.org/index.cgi?do=view&id=6028|preliminary dmesg]] from [[/PiotrKubaj|PiotrKubaj]]'s new board done via netboot. (note the lack of ethernet via ''%%dwc%%''. Beagle-V is ''%%dwc%%'', Hi-Five Unleashed and Unmatched are ''%%cgem%%''. This is being worked on.)
==== Status ====
^ Device/Feature ^ Status ^ Owner ^ Notes ^
| UART | uart_snps works, needs patch | mhorne | |
| MMC | dwmmc working, patches required | mhorne | Survives basic testing, growfs may be broken |
| Ethernet | if_dwc working, needs debugging | | Driver attaches, can find an IP, but usually hangs after sending a few packets |
| l2 cache bits | In progress | mhorne | Need to flush l2 cache on JH7100 due to [[https://raw.githubusercontent.com/starfive-tech/beaglev_doc/main/JH7100%20Cache%20Coherence%20V1.0.pdf|errata]] |
| USB | Needs driver | | ''%%cdns,usb3%%'' compatible |
| clk | ?? | | Current device tree describes all clocks as fixed. This may change in the future, certainly for the production version. |
==== mhorne's dev branch ====
I am able to boot the system to multi-user via SD card. Netbooting works to load the kernel, but mountroot from nfs fails.
For now, my changes are available in the [[https://github.com/mhorne/freebsd/tree/beaglev|beaglev]] branch of my %%GitHub%% repo. I will continue (force) pushing changes here before they are ready for the src tree.
**Suggested setup:**
Download the [[https://download.freebsd.org/ftp/snapshots/riscv/riscv64/ISO-IMAGES/14.0/|GENERICSD]] image, and dd it to your SD card. Overwrite the kernel with one built from my WIP branch. You can boot from the preinstalled u-boot with the following commands:
# fatload mmc 0:1 80200000 /EFI/BOOT/BOOTRISCV64.EFI
# bootefi 80200000
I suggest growing the root filesystem on a different host, as I had a problem doing it on the beaglev.
$ sudo gpart resize -i 2 da0
$ sudo growfs /dev/da0p2
More detailed instructions to come.
==== linimon preliminary notes 20210509 ====
What is provided from the manufacturer is the [[https://github.com/starfive-tech/Fedora_on_StarFive|Fedora boot bits]]. Those are set up as MSDOS partitions. However, %%FreeBSD%%/RISC-V is set up to expect booting from EFI. So, you have to do some work.
* From the Fedora bits, you will need to copy off ''%%hifive-unleashed-a00.dtb%%''
* Download and program an mmc with a [[http://ftp.freebsd.org/pub/FreeBSD/snapshots/riscv/riscv64/ISO-IMAGES/14.0/|FreeBSD RISC-V snapshot]].
* Mount the mmc boot partition (e.g. ''%%/dev/da0p1%%'') on your host machine.
* Copy the dtb into it under new directory ''%%/dtb/%%''. (Unknown if need to to subdir here TBA)
* Make whatever other changes you want to the mmc.
* ''%%umount%%'' the mmc.
* Insert the mmc into the Beagle-V and boot it. It gets to u-boot and then stops.
* Now it's time to type magical stuff to its u-boot:
BeagleV # load mmc 0:1 ${fdt_addr_r} dtb/hifive-unleashed-a00.dtb
1415932 bytes read in 305 ms (4.4 MiB/s)
BeagleV # load mmc 0:1 ${kernel_addr_r} EFI/BOOT/bootriscv64.efi
1415932 bytes read in 305 ms (4.4 MiB/s)
BeagleV # bootefi ${kernel_addr_r} ${fdt_addr_r}
* and you get the logo, and then hang:
Autoboot in 0 seconds, hit [Enter] to boot or any other key to stop
Loading kernel...
/boot/kernel/kernel text=0x563f94 text=0x11e384 data=0xcfb38 data=0x9cc+0x103c54 syms=[0x8+0xb5320+0x8+0xd7732]
Loading configured modules...
can't find '/boot/entropy'
can't find '/etc/hostid'
Using DTB provided by EFI at 0x87f00000.
Kernel entry at 0xc100002e...
Kernel args: (null)
and that's as far as I have gotten.