Installing Alpine Linux on OrangePi RV2: Difference between revisions
mNo edit summary |
|||
| Line 5: | Line 5: | ||
The [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-RV2.html OrangePi RV2] is a credit-card sized development board with a Ky X1 8-Core SoC. The Ky X1 is for all intents and purposes a SpacemiT K1 SoC. The remainder of this guide is more likely to use the terms SpacemiT or K1 as is prevalent throughout the Linux community. Please understand that these terms all refer to the same RISC-V ISA implementation. | The [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-RV2.html OrangePi RV2] is a credit-card sized development board with a Ky X1 8-Core SoC. The Ky X1 is for all intents and purposes a SpacemiT K1 SoC. The remainder of this guide is more likely to use the terms SpacemiT or K1 as is prevalent throughout the Linux community. Please understand that these terms all refer to the same RISC-V ISA implementation. | ||
This guide assumes that the manufacturer provided [https://github.com/riscv-software-src/opensbi OpenSBI] and [https://u-boot.org/ U-Boot] binaries have been applied to the SPI Flash device. This stock bootloader will look for an <code>extlinux/extlinux.conf</code> which will be used to configure the boot process. | |||
Those following this guide may find it useful to have a USB UART serial cable available to debug kernel loading. | |||
This guide borrows heavily from the article [https://arvanta.net/alpine/install-alpine-riscv64-qemu-uboot/ install Alpine Linux riscv64 under qemu with u-boot loader] by Milan P. Stanić and posted to [[Risc64]] by [[User:AnIDFB]]. | |||
== Known issues == | == Known issues == | ||
| Line 13: | Line 19: | ||
* Manufacturer tools are not included | * Manufacturer tools are not included | ||
* Custom built and manually installed kernel required | * Custom built and manually installed kernel required | ||
* Need to explicitly disable the RealTek 8852BS module | |||
== Setting up a workspace == | == Setting up a workspace == | ||
| Line 25: | Line 32: | ||
== Cloning the source, configuring and building the kernel == | == Cloning the source, configuring and building the kernel == | ||
Unfortunately the stock kernels provided by the Alpine Linux project and even the source tarballs from kernel.org will not work. There's still a bit of patchwork involved as not all support is | Unfortunately the stock kernels provided by the Alpine Linux project and even the source tarballs from kernel.org will not work. There's still a bit of patchwork involved as not all support is up-streamed. Fortunately there is someone who is maintaining repository with patched kernel sources. These sources are current | ||
The following command will clone just the current HEAD of the patched repository | |||
<pre>git clone --depth 1 https://github.com/jasonmontleon/linux-spacemit.git | |||
cd linux-spacemit | |||
make ARCH=riscv k1_defconfig | |||
make -j$(nprocs)</pre> | |||
{{Note| | |||
The kernel build may fail. I recommend starting with the k1_defconfig and working through errors as they come up. Only the RealTek 8852BS was an issue at the time of this writing.}} | |||
== Preparing the media == | |||
=== Partition and setup the filesystems === | |||
==== Install the sgdisk package ==== | |||
<pre>doas apk add sgdisk</pre> | |||
==== Insert and partition the boot media ==== | |||
The media can be either an SD card or USB drive. An 2280 PCIe NVMe is also possibly if you have the ability to write it from the host setting up the media. For the purposes of this guide we will refer to our boot media as <code>/dev/sdb</code>. | |||
== Installing the kernel and configuring the bootloader == | |||
[[Category:Riscv64]] | [[Category:Riscv64]] | ||
Revision as of 05:11, 29 March 2026
Do not follow instructions here until this notice is removed. |
Main Page > Architectures > Riscv64 > Installing Alpine Linux on OrangePi RV2

The OrangePi RV2 is a credit-card sized development board with a Ky X1 8-Core SoC. The Ky X1 is for all intents and purposes a SpacemiT K1 SoC. The remainder of this guide is more likely to use the terms SpacemiT or K1 as is prevalent throughout the Linux community. Please understand that these terms all refer to the same RISC-V ISA implementation.
This guide assumes that the manufacturer provided OpenSBI and U-Boot binaries have been applied to the SPI Flash device. This stock bootloader will look for an extlinux/extlinux.conf which will be used to configure the boot process.
Those following this guide may find it useful to have a USB UART serial cable available to debug kernel loading.
This guide borrows heavily from the article install Alpine Linux riscv64 under qemu with u-boot loader by Milan P. Stanić and posted to Risc64 by User:AnIDFB.
Known issues

- WiFi is not functional
- Manufacturer tools are not included
- Custom built and manually installed kernel required
- Need to explicitly disable the RealTek 8852BS module
Setting up a workspace
Begin by setting up a RISC-V workspace by following Running Alpine riscv64 in QEMU. You'll need to establish a build environment in this QEMU guest.
doas apk add alpine-sdk bison flex openssl-dev ncurses ncurses-dev
ncurses and ncurses-dev aren't a hard requirements but are useful if you want to run make menuconfigCloning the source, configuring and building the kernel
Unfortunately the stock kernels provided by the Alpine Linux project and even the source tarballs from kernel.org will not work. There's still a bit of patchwork involved as not all support is up-streamed. Fortunately there is someone who is maintaining repository with patched kernel sources. These sources are current
The following command will clone just the current HEAD of the patched repository
git clone --depth 1 https://github.com/jasonmontleon/linux-spacemit.git cd linux-spacemit make ARCH=riscv k1_defconfig make -j$(nprocs)
Preparing the media
Partition and setup the filesystems
Install the sgdisk package
doas apk add sgdisk
Insert and partition the boot media
The media can be either an SD card or USB drive. An 2280 PCIe NVMe is also possibly if you have the ability to write it from the host setting up the media. For the purposes of this guide we will refer to our boot media as /dev/sdb.
