From b9afaaf1ca3892e4de896279f0ca3ffb11168e1e Mon Sep 17 00:00:00 2001 From: Max Berger Date: Sat, 6 Jan 2024 18:57:57 +0100 Subject: [PATCH] starfive/visionfive2: upgrade to upstream kernel Upstream kernel contains all necessary drivers since version 6.6, thus most of the custom config is no longer needed. Create a separate configuration for the older 1.2 version of the board. Signed-off-by: Max Berger Reviewed-by: Christian Stewart --- README.md | 133 +++++++++--------- configs/starfive/README.md | 25 +++- configs/starfive/visionfive2/buildroot/dts | 2 +- configs/starfive/visionfive2/buildroot/kernel | 13 -- configs/starfive/visionfive2/kernel/l2cache | 1 + configs/starfive/visionfive2/kernel/mmc | 2 + configs/starfive/visionfive2/kernel/network | 3 + configs/starfive/visionfive2/kernel/phy | 3 + .../0001-compilation-fixes-for-GCC-12.patch | 41 ------ .../0002-Enable-8gb-of-memory.patch | 10 +- .../starfive/visionfive2/metadata/description | 2 +- .../resources/boot-scripts/extlinux.conf | 2 +- configs/starfive/visionfive2_12/buildroot/dts | 2 + .../visionfive2_12/metadata/dependencies | 1 + .../visionfive2_12/metadata/description | 1 + .../starfive/visionfive2_12/metadata/unlisted | 0 .../resources/boot-scripts/extlinux.conf | 4 + 17 files changed, 111 insertions(+), 134 deletions(-) create mode 100644 configs/starfive/visionfive2/kernel/l2cache create mode 100644 configs/starfive/visionfive2/kernel/mmc create mode 100644 configs/starfive/visionfive2/kernel/network create mode 100644 configs/starfive/visionfive2/kernel/phy delete mode 100644 configs/starfive/visionfive2/kernel_patches/0001-compilation-fixes-for-GCC-12.patch create mode 100644 configs/starfive/visionfive2_12/buildroot/dts create mode 100644 configs/starfive/visionfive2_12/metadata/dependencies create mode 100644 configs/starfive/visionfive2_12/metadata/description create mode 100644 configs/starfive/visionfive2_12/metadata/unlisted create mode 100644 configs/starfive/visionfive2_12/resources/boot-scripts/extlinux.conf diff --git a/README.md b/README.md index 04727ca0a..a393e4f8d 100644 --- a/README.md +++ b/README.md @@ -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 | | +| **System** | **Config Package** | **Bootloader** | **Kernel** | +|-----------------------|---------------------------|------------------|-----------------| +| VirtualBox | [virt/virtualbox] | N/A | ✔ 6.6.8 | +| [Docker Img] | [virt/docker] | N/A | N/A | +| [Qemu] | [virt/qemu] | N/A | ✔ 6.6.8 | +| [V86] on WebAssembly | [browser/v86] | [V86] | ✔ 6.6.8 | +| [WSL] on Windows | [virt/wsl] | N/A | N/A | +|-----------------------|---------------------------|------------------|-----------------| +| [Allwinner Nezha] | [allwinner/nezha] | ✔ U-boot 2022.10 | ✔ sm-6.1-rc3 | +| [Apple Macbook] | [apple/macbook] | ✔ [rEFInd] | ✔ 6.6.8 | +| [BananaPi M1+/Pro] | [bananapi/m1plus] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | +| [BananaPi M1] | [bananapi/m1] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | +| [BananaPi M2] | [bananapi/m2] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | +| [BananaPi M2+] | [bananapi/m2plus] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | +| [BananaPi M2 Ultra] | [bananapi/m2ultra] | ✔ U-Boot 2023.07 | ✔ 6.6.8 | +| [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 | +| **[Intel x86/64]** | [intel/desktop] | ✔ [rEFInd] | ✔ 6.6.8 | +| [ModalAI Voxl2] | [modalai/voxl2] | N/A | ✔ msm-4.19.125 | +| [NVIDIA Jetson AGX] | [jetson/agx] | ✔ UEFI | ✔ [nv-5.10.104] | +| [NVIDIA Jetson Nano] | [jetson/nano] | ✔ U-Boot | ✔ [nv-4.9.337] | +| [NVIDIA Jetson TX2] | [jetson/tx2] | ✔ U-Boot | ✔ [nv-4.9.337] | +| [Odroid C2] | [odroid/c2] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [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 | +| [Odroid HC2] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [Odroid HC4] | [odroid/hc4] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [Odroid M1] | [odroid/m1] | ✔ U-Boot 2017.09 | ✔ tb-6.4.3 | +| [Odroid N2]+ | [odroid/n2] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [Odroid N2L] | [odroid/n2l] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [Odroid U] | [odroid/u] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [Odroid XU3] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [Odroid XU4] | [odroid/xu] | ✔ U-Boot 2023.07 | ✔ tb-6.4.3 | +| [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 | +| [Pi 1] | [pi/1] | N/A | ✔ rpi-6.1.66 | +| [Pi 3] + 1, 2 | [pi/3] | N/A | ✔ rpi-6.1.66 | +| [Pi 4] | [pi/4] | N/A | ✔ rpi-6.1.66 | +| [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 | +| [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 | +| [Rock64] rk3328 | [pine64/rock64] | ✔ U-Boot 2022.04 | ✔ megi-6.6-pre | +| [RockPro64] | [pine64/rockpro64] | ✔ U-Boot (bin) | ✔ megi-6.6-pre | +| [Sipeed LicheeRV] | [allwinner/licheerv] | ✔ U-Boot 2022.07 | ✔ sm-5.19-rc1 | +| [VisionFive] | [starfive/visionfive] | ✔ U-Boot 2021.04 | ✔ sv-5.19-rc3 | +| [VisionFive2] v1.2 | [starfive/visionfive2_12] | ✔ U-Boot 2021.10 | ✔ 6.6.8 | +| [VisionFive2] v1.3 | [starfive/visionfive2] | ✔ U-Boot 2021.10 | ✔ 6.6.8 | +| [USBArmory Mk2] | [usbarmory/mk2] | ✔ U-Boot 2020.10 | ✔ 6.6.8 | +| Valve [Steam Deck] | [valve/deck] | N/A | ✔ valve-6.1.9 | +| [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) @@ -159,13 +160,12 @@ main SkiffOS repository: [Qemu]: ./configs/virt/qemu [Rock64]: https://www.pine64.org/devices/single-board-computers/rock64/ [RockPro64]: https://www.pine64.org/rockpro64/ -[Run in Browser]: https://copy.sh/v86/?profile=copy/skiffos [Sipeed LicheeRV]: https://linux-sunxi.org/Sipeed_Lichee_RV -[StarFive VisionFive]: https://ameridroid.com/products/visionfive-starfive -[StarFive VisionFive2]: https://ameridroid.com/products/visionfive-2 +[VisionFive]: https://ameridroid.com/products/visionfive-starfive +[VisionFive2]: https://ameridroid.com/products/visionfive-2 [Steam Deck]: https://store.steampowered.com/steamdeck [USBArmory Mk2]: https://github.com/f-secure-foundry/usbarmory -[V86]: https://github.com/copy/v86 +[V86]: https://copy.sh/v86/?profile=copy/skiffos [Wandboard]: https://elinux.org/Wandboard [WSL]: https://docs.microsoft.com/en-us/windows/wsl/ [nv-4.9.337]: https://github.com/skiffos/linux/tree/skiff-jetson-4.9.x @@ -218,6 +218,7 @@ main SkiffOS repository: [pine64/rockpro64]: ./configs/pine64/rockpro64 [starfive/visionfive]: ./configs/starfive/visionfive [starfive/visionfive2]: ./configs/starfive/visionfive2 +[starfive/visionfive2_12]: ./configs/starfive/visionfive2_12 [usbarmory/mk2]: ./configs/usbarmory [valve/deck]: ./configs/valve/deck [virt/docker]: ./configs/virt/docker diff --git a/configs/starfive/README.md b/configs/starfive/README.md index 23ef139d2..84c6dd091 100644 --- a/configs/starfive/README.md +++ b/configs/starfive/README.md @@ -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 @@ -100,12 +103,22 @@ 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 mainline kernel is used. + +See [the upstream defconfig] for useful config options. + +[the upstream defconfig]: 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 diff --git a/configs/starfive/visionfive2/buildroot/dts b/configs/starfive/visionfive2/buildroot/dts index f5a363491..ec2c978e4 100644 --- a/configs/starfive/visionfive2/buildroot/dts +++ b/configs/starfive/visionfive2/buildroot/dts @@ -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" diff --git a/configs/starfive/visionfive2/buildroot/kernel b/configs/starfive/visionfive2/buildroot/kernel index 3f69cfa89..4f3de8526 100644 --- a/configs/starfive/visionfive2/buildroot/kernel +++ b/configs/starfive/visionfive2/buildroot/kernel @@ -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" diff --git a/configs/starfive/visionfive2/kernel/l2cache b/configs/starfive/visionfive2/kernel/l2cache new file mode 100644 index 000000000..0c88f87b6 --- /dev/null +++ b/configs/starfive/visionfive2/kernel/l2cache @@ -0,0 +1 @@ +CONFIG_SIFIVE_CCACHE=y diff --git a/configs/starfive/visionfive2/kernel/mmc b/configs/starfive/visionfive2/kernel/mmc new file mode 100644 index 000000000..06f5b6dff --- /dev/null +++ b/configs/starfive/visionfive2/kernel/mmc @@ -0,0 +1,2 @@ +CONFIG_MMC_DW=y +CONFIG_MMC_DW_STARFIVE=y diff --git a/configs/starfive/visionfive2/kernel/network b/configs/starfive/visionfive2/kernel/network new file mode 100644 index 000000000..a453606bc --- /dev/null +++ b/configs/starfive/visionfive2/kernel/network @@ -0,0 +1,3 @@ +CONFIG_DWMAC_STARFIVE=y +CONFIG_MICROCHIP_PHY=y +CONFIG_MOTORCOMM_PHY=y diff --git a/configs/starfive/visionfive2/kernel/phy b/configs/starfive/visionfive2/kernel/phy new file mode 100644 index 000000000..52d6cfb85 --- /dev/null +++ b/configs/starfive/visionfive2/kernel/phy @@ -0,0 +1,3 @@ +CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=y +CONFIG_PHY_STARFIVE_JH7110_PCIE=y +CONFIG_PHY_STARFIVE_JH7110_USB=y diff --git a/configs/starfive/visionfive2/kernel_patches/0001-compilation-fixes-for-GCC-12.patch b/configs/starfive/visionfive2/kernel_patches/0001-compilation-fixes-for-GCC-12.patch deleted file mode 100644 index 5973655fa..000000000 --- a/configs/starfive/visionfive2/kernel_patches/0001-compilation-fixes-for-GCC-12.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 9e11ff8ba311714f2dbb2267ef93df7db4d4deee Mon Sep 17 00:00:00 2001 -From: Max Berger -Date: Wed, 22 Feb 2023 21:58:14 +0100 -Subject: [PATCH] compilation fixes for GCC 12 - ---- - security/keys/dh.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/security/keys/dh.c b/security/keys/dh.c -index 1abfa70ed6e10..b75b4e6d80239 100644 ---- a/security/keys/dh.c -+++ b/security/keys/dh.c -@@ -281,21 +281,21 @@ long __keyctl_dh_compute(struct keyctl_dh_params __user *params, - - memset(&dh_inputs, 0, sizeof(dh_inputs)); - -- dlen = dh_data_from_key(pcopy.prime, &dh_inputs.p); -+ dlen = dh_data_from_key(pcopy.prime, (void**) &dh_inputs.p); - if (dlen < 0) { - ret = dlen; - goto out1; - } - dh_inputs.p_size = dlen; - -- dlen = dh_data_from_key(pcopy.base, &dh_inputs.g); -+ dlen = dh_data_from_key(pcopy.base, (void**) &dh_inputs.g); - if (dlen < 0) { - ret = dlen; - goto out2; - } - dh_inputs.g_size = dlen; - -- dlen = dh_data_from_key(pcopy.private, &dh_inputs.key); -+ dlen = dh_data_from_key(pcopy.private, (void**) &dh_inputs.key); - if (dlen < 0) { - ret = dlen; - goto out2; --- -2.40.1 - diff --git a/configs/starfive/visionfive2/kernel_patches/0002-Enable-8gb-of-memory.patch b/configs/starfive/visionfive2/kernel_patches/0002-Enable-8gb-of-memory.patch index 696243247..11f5b154e 100644 --- a/configs/starfive/visionfive2/kernel_patches/0002-Enable-8gb-of-memory.patch +++ b/configs/starfive/visionfive2/kernel_patches/0002-Enable-8gb-of-memory.patch @@ -6,13 +6,13 @@ Subject: [PATCH] Enable 8gb of memory See https://github.com/starfive-tech/VisionFive2/issues/20 for details --- - arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi | 2 +- + arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi +diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index 4196574103eaa..05ef0ddb4689a 100755 ---- a/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi -+++ b/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi +--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi ++++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -46,7 +46,7 @@ cpus { memory@40000000 { @@ -21,7 +21,7 @@ index 4196574103eaa..05ef0ddb4689a 100755 + reg = <0x0 0x40000000 0x2 0x0>; }; - reserved-memory { + gpio-restart { -- 2.40.1 diff --git a/configs/starfive/visionfive2/metadata/description b/configs/starfive/visionfive2/metadata/description index 3f126005e..df919bcb5 100644 --- a/configs/starfive/visionfive2/metadata/description +++ b/configs/starfive/visionfive2/metadata/description @@ -1 +1 @@ -Configuration for StarFive VisionFive2. +Configuration for StarFive VisionFive2 v1.3 diff --git a/configs/starfive/visionfive2/resources/boot-scripts/extlinux.conf b/configs/starfive/visionfive2/resources/boot-scripts/extlinux.conf index 18b5dd8ea..8c333791e 100644 --- a/configs/starfive/visionfive2/resources/boot-scripts/extlinux.conf +++ b/configs/starfive/visionfive2/resources/boot-scripts/extlinux.conf @@ -1,4 +1,4 @@ LABEL SkiffOS KERNEL /boot/Image - FDT /boot/jh7110-visionfive-v2.dtb + FDT /boot/jh7110-starfive-visionfive-2-v1.3b.dtb APPEND root=/dev/mmcblk1p1 rootwait rw init=/boot/skiff-init/skiff-init-squashfs console=ttyS0,115200 earlycon stmmaceth=chain_mode:1 fsck.repair=yes net.ifnames=0 diff --git a/configs/starfive/visionfive2_12/buildroot/dts b/configs/starfive/visionfive2_12/buildroot/dts new file mode 100644 index 000000000..b9199ad37 --- /dev/null +++ b/configs/starfive/visionfive2_12/buildroot/dts @@ -0,0 +1,2 @@ +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="starfive/jh7110-starfive-visionfive-2-v1.2a" \ No newline at end of file diff --git a/configs/starfive/visionfive2_12/metadata/dependencies b/configs/starfive/visionfive2_12/metadata/dependencies new file mode 100644 index 000000000..0a5b5577c --- /dev/null +++ b/configs/starfive/visionfive2_12/metadata/dependencies @@ -0,0 +1 @@ +starfive/visionfive2 diff --git a/configs/starfive/visionfive2_12/metadata/description b/configs/starfive/visionfive2_12/metadata/description new file mode 100644 index 000000000..4119120f3 --- /dev/null +++ b/configs/starfive/visionfive2_12/metadata/description @@ -0,0 +1 @@ +Configuration for StarFive VisionFive2 v1.2 diff --git a/configs/starfive/visionfive2_12/metadata/unlisted b/configs/starfive/visionfive2_12/metadata/unlisted new file mode 100644 index 000000000..e69de29bb diff --git a/configs/starfive/visionfive2_12/resources/boot-scripts/extlinux.conf b/configs/starfive/visionfive2_12/resources/boot-scripts/extlinux.conf new file mode 100644 index 000000000..a98645136 --- /dev/null +++ b/configs/starfive/visionfive2_12/resources/boot-scripts/extlinux.conf @@ -0,0 +1,4 @@ +LABEL SkiffOS + KERNEL /boot/Image + FDT /boot/jh7110-starfive-visionfive-2-v1.2a.dtb + APPEND root=/dev/mmcblk1p1 rootwait rw init=/boot/skiff-init/skiff-init-squashfs console=ttyS0,115200 earlycon stmmaceth=chain_mode:1 fsck.repair=yes net.ifnames=0