Skip to content

meta-riscv: add K3 platform support#635

Closed
yingjie-liu-spacemit wants to merge 2 commits into
riscv:masterfrom
yingjie-liu-spacemit:work
Closed

meta-riscv: add K3 platform support#635
yingjie-liu-spacemit wants to merge 2 commits into
riscv:masterfrom
yingjie-liu-spacemit:work

Conversation

@yingjie-liu-spacemit

Copy link
Copy Markdown

meta-riscv: add SpacemiT K3 platform BSP support

What changed:

Add BSP support for the SpacemiT K3 platform, covering multiple board
variants (COM260, Pico-ITX, EVB, etc.) built from a single MACHINE=k3
target.

Currently supported images:

  • core-image-minimal
  • core-image-weston

Files added/modified:

  • conf/machine/k3.conf: machine definition with all K3 device trees
  • conf/machine/include/k3-common.inc: shared K3 image configuration
  • recipes-core/images/image-k3.inc: image generation with bootfs, Titan
    archive, and WIC support
  • files/wic/k3.wks: WIC partitioning layout for SD card boot
  • kas/k3.yml: kas build configuration for K3
  • recipes-bsp/k3-rootfs-overlay: rootfs overlay for weston, network
    config; WiFi/BT firmware via linux-firmware packages
  • recipes-bsp/opensbi/opensbi-k3_1.4.bb: OpenSBI build recipe
  • recipes-bsp/u-boot/u-boot-k3_2022.10.bb: U-Boot build recipe
  • recipes-bsp/esos/esos-k3_1.0.0.bb: ESOS secure boot firmware recipe
  • recipes-kernel/linux/linux-k3-dev.bb: kernel recipe
  • recipes-graphics/mesa/mesa-k3.bb: Mesa with Imagination GPU support
  • recipes-graphics/img-gpu-powervr/img-gpu-powervr.bb: PowerVR GPU
    userspace
  • recipes-core/images/core-image-weston.bbappend: add K3 packages
  • recipes-core/images/core-image-minimal.bbappend: add K3 packages
  • README.md: add K3 to Available Machines table

Intent:

Enable the Yocto community to build and run images on SpacemiT K3
RISC-V SoC boards out of the box. The K3 is a RISC-V application
processor with Imagination GPU, targeting desktop and edge computing
use cases.

How to build:

MACHINE=k3 bitbake core-image-weston

Or with kas:

kas build kas/k3.yml

Tested:

  • core-image-minimal: boots to login on COM260 and Pico-ITX boards
  • core-image-weston: boots to Weston desktop on COM260 and Pico-ITX
    boards
  • kas/k3.yml: not yet tested

New platform added to README table: Yes — K3 row added to Available
Machines.

Signed-off-by: liuyingjie yingjie.liu@spacemit.com

liuyingjie added 2 commits May 15, 2026 17:04
Add BSP support for the SpacemiT K3 platform, covering multiple
board variants (COM260, Pico-ITX, EVB, etc.) built from a single
`MACHINE=k3` target.

Currently supported images:
- core-image-minimal
- core-image-weston

Changes include:
- conf/machine/k3.conf: machine definition with all K3 device trees
- conf/machine/include/k3-common.inc: shared K3 image configuration
- recipes-core/images/image-k3.inc: image generation with bootfs, Titan
  archive, and WIC support
- files/wic/k3.wks: WIC partitioning layout for SD card boot
- kas/k3.yml: kas build configuration for K3
- recipes-bsp/k3-rootfs-overlay: rootfs overlay for weston, network,
  firmware; use linux-firmware packages instead of embedded blobs
- recipes-core/images/core-image-weston.bbappend: add K3 packages
- recipes-core/images/core-image-minimal.bbappend: add K3 packages
- README.md: add K3 to Available Machines table
OpenSBI upstream now uses CSR macro definitions (CSR_ML2SETUP,
CSR_MSETUP) instead of direct register names, ensuring compatibility
with the open-source toolchain. The proprietary Spacemit toolchain is
no longer needed.

- Remove spacemit-toolchain_1.2.2.bb recipe
- Remove spacemit-toolchain-native from opensbi-k3 DEPENDS
- Use ${TARGET_PREFIX} (OE default cross-compiler) instead of
  Spacemit-specific CROSS_COMPILE path
@threexc

Copy link
Copy Markdown
Contributor

Hi yingjie-liu-spacemit , thanks for submitting this. I'm at BayLibre. We've received your request to help port this support to Yocto. I'm working on a simplified submission of the changes you have submitted over here: #636

@yingjie-liu-spacemit

Copy link
Copy Markdown
Author

Hi yingjie-liu-spacemit , thanks for submitting this. I'm at BayLibre. We've received your request to help port this support to Yocto. I'm working on a simplified submission of the changes you have submitted over here: #636

Hi Trevor Gamblin (@threexc),

Thank you so much for your help! I apologize for not fully understanding the upstreaming and submission guidelines for this repository earlier.

I have gone through the discussions in #636 and agree that a cleaner, more simplified breakdown is the best way forward. I will close this PR (#635) now, and I look forward to collaborating with you and the BayLibre team to successfully port the SpacemiT K3 platform support to meta-riscv.

Best regards,
Yingjie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants