This repo is a fork of electron with riscv64 support added.
Releases are published in https://github.com/riscv-forks/electron-riscv-releases
Branches with riscv64 support have a suffix of -riscv. e.g. main-riscv, 28-x-y-riscv, v29.1.1-riscv.
- Debian riscv sysroot
Note: To build the sysroot, please checkout chromium source code at 1273786fb3efd and apply the sysroot.patch. The sysroot creator patch is not maintained in electron patches.
This repo supports both building in RISC-V environment and cross-compiling from a x86-64 host.
Debian bookworm.
First, install depot_tools and add it to PATH.
Then, get the source code:
$ mkdir electron && cd electron
$ gclient config --name "src/electron" --unmanaged https://github.com/riscv-forks/electron@BRANCH_NAME_HERE
$ gclient sync --with_branch_heads --with_tagsPlease download the latest debian sysroot from GitHub Releases and put it at build/linux/debian_trixie_riscv64-sysroot:
rm -rf build/linux/debian_trixie_riscv64-sysroot
mkdir build/linux/debian_trixie_riscv64-sysroot
tar xf "$YOUR_DOWNLOADED_SYSROOT_FILE" --directory=build/linux/debian_trixie_riscv64-sysrootRun GN:
./buildtools/linux64/gn gen out/Release-riscv64 --args="import(\"//electron/build/args/release.gn\") target_cpu = \"riscv64\""Run ninja:
autoninja -C out/Release-riscv64/ electronGenerate Dist Zip:
electron/script/strip-binaries.py -d out/Release-riscv64 --target-cpu riscv64
autoninja -C out/Release-riscv64 electron:electron_dist_zipArch Linux riscv64 is building electron on riscv64.
The patch of Arch Linux's PKGBUILD is available here for reference: https://github.com/felixonmars/archriscv-packages/blob/master/electron28/riscv64.patch
- Set up CI to automatically create riscv branches from upstream tags.
- Cover more tests in Chromium CI.