Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisionFive2: Upgrade to upstream kernel #301

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 63 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,68 +47,69 @@ The Buildroot OS cross-compiler can target any Linux-compatible device or
virtual machine. These system configuration packages are available in the
main SkiffOS repository:

| **Board** | **Config Package** | **Bootloader** | **Kernel** | **Notes** |
|------------------------|------------------------|------------------|-----------------|------------------|
| VirtualBox | [virt/virtualbox] | N/A | ✔ 6.6.8 | Run in VM |
| [Docker Img] | [virt/docker] | N/A | N/A | Run in Docker |
| [Qemu] | [virt/qemu] | N/A | ✔ 6.6.8 | Run in QEmu |
| [V86] on WebAssembly | [browser/v86] | [V86] | ✔ 6.6.8 | [Run in Browser] |
| [WSL] on Windows | [virt/wsl] | N/A | N/A | Run in WSL2 |
|------------------------|------------------------|------------------|-----------------|------------------|
| [Allwinner Nezha] | [allwinner/nezha] | ✔ U-boot 2022.10 | ✔ sm-6.1-rc3 | RISC-V D1 |
| [Apple Macbook] | [apple/macbook] | ✔ [rEFInd] | ✔ 6.6.8 | ✔ Tested |
| [BananaPi M1+/Pro] | [bananapi/m1plus] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M1] | [bananapi/m1] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M2] | [bananapi/m2] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M2+] | [bananapi/m2plus] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M2 Ultra] | [bananapi/m2ultra] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M3] | [bananapi/m3] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | |
| [BeagleBoard X15] | [beaglebone/x15] | ✔ U-Boot 2022.04 | ✔ 5.10.168-ti | |
| [BeagleBone AI] | [beaglebone/ai] | ✔ U-Boot 2022.04 | ✔ 5.10.168-ti | |
| [BeagleBone Black] | [beaglebone/black] | ✔ U-Boot 2022.04 | ✔ 5.10.168-ti | |
| [BeagleBoard BeagleV] | [starfive/visionfive] | ✔ U-Boot 2021.04 | ✔ sv-5.19-rc3 | RISC-V |
| **[Intel x86/64]** | [intel/desktop] | ✔ [rEFInd] | ✔ 6.6.8 | ✔ Tested |
| [ModalAI Voxl2] | [modalai/voxl2] | N/A | ✔ msm-4.19.125 | |
| [NVIDIA Jetson AGX] | [jetson/agx] | ✔ UEFI | ✔ [nv-5.10.104] | ✔ Tested |
| [NVIDIA Jetson Nano] | [jetson/nano] | ✔ U-Boot | ✔ [nv-4.9.337] | ⚠ Obsolete |
| [NVIDIA Jetson TX2] | [jetson/tx2] | ✔ U-Boot | ✔ [nv-4.9.337] | ⚠ Obsolete |
| [Odroid C2] | [odroid/c2] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid C4] | [odroid/c4] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | |
| [Odroid H2] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid H2+] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid H3] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid H3+] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid HC1] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid HC2] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid HC4] | [odroid/hc4] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid M1] | [odroid/m1] | ✔ U-Boot 2017.09 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid N2]+ | [odroid/n2] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid N2L] | [odroid/n2l] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid U] | [odroid/u] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid XU3] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid XU4] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [OrangePi Lite] | [orangepi/lite] | ✔ U-Boot 2018.05 | ✔ 6.6.8 | |
| [OrangePi Zero] | [orangepi/zero] | ✔ U-Boot 2018.07 | ✔ 6.6.8 | |
| [PcDuino 3] | [pcduino/3] | ✔ U-Boot 2019.07 | ✔ 6.6.8 | |
| [PcEngines APU2] | [pcengines/apu2] | ✔ CoreBoot | ✔ 6.6.8 | |
| [Pi 0] | [pi/0] | N/A | ✔ rpi-6.1.66 | ✔ Tested |
| [Pi 1] | [pi/1] | N/A | ✔ rpi-6.1.66 | |
| [Pi 3] + 1, 2 | [pi/3] | N/A | ✔ rpi-6.1.66 | ✔ Tested |
| [Pi 4] | [pi/4] | N/A | ✔ rpi-6.1.66 | ✔ Tested |
| [Pi 4] (32bit mode) | [pi/4x32] | N/A | ✔ rpi-6.1.66 | |
| [Pine64 H64] | [pine64/h64] | ✔ U-Boot 2022.04 | ✔ megi-6.6-pre | |
| [PineBook A64] | [pine64/book_a64] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | ⚠ Obsolete |
| [PineBook Pro] | [pine64/book] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | |
| [PinePhone] | [pine64/phone] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | |
| [PinePhone Pro] | [pine64/phone_pro] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | ⚠ Experimental |
| [Rock64] rk3328 | [pine64/rock64] | ✔ U-Boot 2022.04 | ✔ megi-6.6-pre | |
| [RockPro64] | [pine64/rockpro64] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | ✔ Tested |
| [Sipeed LicheeRV] | [allwinner/licheerv] | ✔ U-Boot 2022.07 | ✔ sm-5.19-rc1 | RISC-V D1 |
| [StarFive VisionFive] | [starfive/visionfive] | ✔ U-Boot 2021.04 | ✔ sv-5.19-rc3 | RISC-V |
| [StarFive VisionFive2] | [starfive/visionfive2] | ✔ U-Boot 2021.10 | ✔ s5-5.15.0 | RISC-V |
| [USBArmory Mk2] | [usbarmory/mk2] | ✔ U-Boot 2020.10 | ✔ 6.6.8 | |
| Valve [Steam Deck] | [valve/deck] | N/A | ✔ valve-6.1.9 | ✔ Tested |
| [Wandboard] | [freescale/wandboard] | ✔ U-Boot 2022.04 | ✔ 6.6.8 | |
| **Board** | **Config Package** | **Bootloader** | **Kernel** | **Notes** |
|---------------------------|---------------------------|------------------|-----------------|------------------|
| VirtualBox | [virt/virtualbox] | N/A | ✔ 6.6.8 | Run in VM |
| [Docker Img] | [virt/docker] | N/A | N/A | Run in Docker |
| [Qemu] | [virt/qemu] | N/A | ✔ 6.6.8 | Run in QEmu |
| [V86] on WebAssembly | [browser/v86] | [V86] | ✔ 6.6.8 | [Run in Browser] |
| [WSL] on Windows | [virt/wsl] | N/A | N/A | Run in WSL2 |
|---------------------------|---------------------------|------------------|-----------------|------------------|
| [Allwinner Nezha] | [allwinner/nezha] | ✔ U-boot 2022.10 | ✔ sm-6.1-rc3 | RISC-V D1 |
| [Apple Macbook] | [apple/macbook] | ✔ [rEFInd] | ✔ 6.6.8 | ✔ Tested |
| [BananaPi M1+/Pro] | [bananapi/m1plus] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M1] | [bananapi/m1] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M2] | [bananapi/m2] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M2+] | [bananapi/m2plus] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M2 Ultra] | [bananapi/m2ultra] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | ⚠ Obsolete |
| [BananaPi M3] | [bananapi/m3] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | |
| [BeagleBoard X15] | [beaglebone/x15] | ✔ U-Boot 2022.04 | ✔ 5.10.168-ti | |
| [BeagleBone AI] | [beaglebone/ai] | ✔ U-Boot 2022.04 | ✔ 5.10.168-ti | |
| [BeagleBone Black] | [beaglebone/black] | ✔ U-Boot 2022.04 | ✔ 5.10.168-ti | |
| [BeagleBoard BeagleV] | [starfive/visionfive] | ✔ U-Boot 2021.04 | ✔ sv-5.19-rc3 | RISC-V |
| **[Intel x86/64]** | [intel/desktop] | ✔ [rEFInd] | ✔ 6.6.8 | ✔ Tested |
| [ModalAI Voxl2] | [modalai/voxl2] | N/A | ✔ msm-4.19.125 | |
| [NVIDIA Jetson AGX] | [jetson/agx] | ✔ UEFI | ✔ [nv-5.10.104] | ✔ Tested |
| [NVIDIA Jetson Nano] | [jetson/nano] | ✔ U-Boot | ✔ [nv-4.9.337] | ⚠ Obsolete |
| [NVIDIA Jetson TX2] | [jetson/tx2] | ✔ U-Boot | ✔ [nv-4.9.337] | ⚠ Obsolete |
| [Odroid C2] | [odroid/c2] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid C4] | [odroid/c4] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | |
| [Odroid H2] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid H2+] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid H3] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid H3+] | [odroid/h3] | ✔ [rEFInd] | ✔ 6.6.8 | |
| [Odroid HC1] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid HC2] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid HC4] | [odroid/hc4] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid M1] | [odroid/m1] | ✔ U-Boot 2017.09 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid N2]+ | [odroid/n2] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid N2L] | [odroid/n2l] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [Odroid U] | [odroid/u] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid XU3] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ⚠ Obsolete |
| [Odroid XU4] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | ✔ Tested |
| [OrangePi Lite] | [orangepi/lite] | ✔ U-Boot 2018.05 | ✔ 6.6.8 | |
| [OrangePi Zero] | [orangepi/zero] | ✔ U-Boot 2018.07 | ✔ 6.6.8 | |
| [PcDuino 3] | [pcduino/3] | ✔ U-Boot 2019.07 | ✔ 6.6.8 | |
| [PcEngines APU2] | [pcengines/apu2] | ✔ CoreBoot | ✔ 6.6.8 | |
| [Pi 0] | [pi/0] | N/A | ✔ rpi-6.1.66 | ✔ Tested |
| [Pi 1] | [pi/1] | N/A | ✔ rpi-6.1.66 | |
| [Pi 3] + 1, 2 | [pi/3] | N/A | ✔ rpi-6.1.66 | ✔ Tested |
| [Pi 4] | [pi/4] | N/A | ✔ rpi-6.1.66 | ✔ Tested |
| [Pi 4] (32bit mode) | [pi/4x32] | N/A | ✔ rpi-6.1.66 | |
| [Pine64 H64] | [pine64/h64] | ✔ U-Boot 2022.04 | ✔ megi-6.6-pre | |
| [PineBook A64] | [pine64/book_a64] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | ⚠ Obsolete |
| [PineBook Pro] | [pine64/book] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | |
| [PinePhone] | [pine64/phone] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | |
| [PinePhone Pro] | [pine64/phone_pro] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | ⚠ Experimental |
| [Rock64] rk3328 | [pine64/rock64] | ✔ U-Boot 2022.04 | ✔ megi-6.6-pre | |
| [RockPro64] | [pine64/rockpro64] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | ✔ Tested |
| [Sipeed LicheeRV] | [allwinner/licheerv] | ✔ U-Boot 2022.07 | ✔ sm-5.19-rc1 | RISC-V D1 |
| [StarFive VisionFive] | [starfive/visionfive] | ✔ U-Boot 2021.04 | ✔ sv-5.19-rc3 | RISC-V |
| [StarFive VisionFive2] | [starfive/visionfive2] | ✔ U-Boot 2021.10 | ✔ 6.6.8 | RISC-V, 1.3 |
| [StarFive VisionFive2_12] | [starfive/visionfive2_12] | ✔ U-Boot 2021.10 | ✔ 6.6.8 | RISC-V, 1.2 |
| [USBArmory Mk2] | [usbarmory/mk2] | ✔ U-Boot 2020.10 | ✔ 6.6.8 | |
| Valve [Steam Deck] | [valve/deck] | N/A | ✔ valve-6.1.9 | ✔ Tested |
| [Wandboard] | [freescale/wandboard] | ✔ U-Boot 2022.04 | ✔ 6.6.8 | |

[Allwinner Nezha]: https://linux-sunxi.org/Allwinner_Nezha
[Apple Macbook]: https://wiki.gentoo.org/wiki/Apple_Macbook_Pro_Retina_(early_2013)
Expand Down
21 changes: 15 additions & 6 deletions configs/starfive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,28 @@ You may need to flash uboot and opensbi according to the instructions on the sta
There are specific packages tuned to each model. The boards are all actively
tested by the developers unless otherwise noted.

| **Board** | **Config Package** | Notes |
|---------------|------------------------|-----------------------|
| [visionfive] | [starfive/visionfive] | SiFive U74 RV64GC |
| [beaglev] | [starfive/visionfive] | Compatible w/ BeagleV |
| [visionfive2] | [starfive/visionfive2] | ⚠ Experimental |
| **Board** | **Config Package** | Notes |
|-----------------------|---------------------------|-----------------------|
| [visionfive] | [starfive/visionfive] | SiFive U74 RV64GC |
| [beaglev] | [starfive/visionfive] | Compatible w/ BeagleV |
| [visionfive2] 1.3b | [starfive/visionfive2] | ⚠ Experimental |
| [visionfive2_12] 1.2a | [starfive/visionfive2_12] | ⚠ Experimental |

[beaglev]: https://beagleboard.org/static/beagleV/beagleV.html
[visionfive]: https://ameridroid.com/products/visionfive-starfive
[starfive/visionfive]: ./visionfive
[starfive/visionfive2]: ./visionfive2
[starfive/visionfive2_12]: ./visionfive2_12

## Known issues

### StarFive2

- The persist partition is not resized properly:
- The persist partition is not resized properly:
- https://github.com/skiffos/SkiffOS/issues/273
- Use the format and install scripts which size the partition correctly.
- OR, resize the partition on another machine after formatting w/ an image.
- Please use the version appropriate for your board!

## SD Card Compatibility

Expand All @@ -100,12 +103,18 @@ Some SD cards may not work as well with the Starfive hardware.

## Kernel

### BeagleV / VisionFive 1

The kernel used is the [StarFive VisionFive] kernel.

[StarFive VisionFive]: https://github.com/starfive-tech/linux/tree/visionfive

Mirrored [here](https://github.com/skiffos/linux/tree/visionfive).

### VisionFive 2

The kernel used is the mainline kernel. For Useful kernel configuration options, see https://github.com/starfive-tech/linux/blob/JH7110_VisionFive2_upstream/arch/riscv/configs/starfive_visionfive2_defconfig

## Flashing low-level bootloaders

The boards come factory-flashed with compatible low-level bootloaders
Expand Down
2 changes: 1 addition & 1 deletion configs/starfive/visionfive2/buildroot/dts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="starfive/jh7110-visionfive-v2"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="starfive/jh7110-starfive-visionfive-2-v1.3b"
13 changes: 0 additions & 13 deletions configs/starfive/visionfive2/buildroot/kernel
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y

# branch: JH7110_VisionFive2_devel
# source: https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_devel
# a87c6861c6d96621026ee53b94f081a1a00a4cc7
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,linux,a87c6861c6d96621026ee53b94f081a1a00a4cc7)/linux-visionfive2-5.15.0-r2.tar.gz"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y

BR2_KERNEL_HEADERS_SAME_AS_KERNEL=y
BR2_KERNEL_HEADERS_AS_KERNEL=y

BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG="starfive_visionfive2"
1 change: 1 addition & 0 deletions configs/starfive/visionfive2/kernel/l2cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_SIFIVE_CCACHE=y
2 changes: 2 additions & 0 deletions configs/starfive/visionfive2/kernel/mmc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_MMC_DW=y
CONFIG_MMC_DW_STARFIVE=y
3 changes: 3 additions & 0 deletions configs/starfive/visionfive2/kernel/network
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_DWMAC_STARFIVE=y
CONFIG_MICROCHIP_PHY=y
CONFIG_MOTORCOMM_PHY=y
3 changes: 3 additions & 0 deletions configs/starfive/visionfive2/kernel/phy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=y
CONFIG_PHY_STARFIVE_JH7110_PCIE=y
CONFIG_PHY_STARFIVE_JH7110_USB=y

This file was deleted.

Loading