Size: 1318
Comment: Minor fix
|
Size: 1681
Comment: typos
|
Deletions are marked like this. | Additions are marked like this. |
Line 21: | Line 21: |
|| [[DebianPts:gcc-9-riscv64-linux-gnu|gcc-9-riscv64-linux-gnu]] || C compiler || | || [[DebianPts:gcc-riscv64-unknown-elf|gcc-riscv64-unknown-elf]] || C compiler || use --print-multi-lib to see compile targets, use for example -march=rv32imac -mabi=ilp32 || || [[DebianPts:llvm-defaults|clang]] || C compiler || use --print-targets to check support, use --target=riscv32 to build || |
Line 42: | Line 43: |
==== chroot ==== DebianPackage:qemu-user-static supports riscv32 if you would like to install a 32-bit RISC-V Linux distro into a chroot. |
This page contains details about cross-compiling for the RISC-V architecture called riscv32.
The RISC-V architecture provides 32-bit, 64-bit, and 128-bit variants.
While theoretically possible to run Debian on a 32-bit RISC-V architecture, most available 32-bit CPUs are limited to microcontrollers or low-memory systems.
Available devices
Description and website |
Docs |
|
|
Compilers and libraries
C compiler |
use --print-multi-lib to see compile targets, use for example -march=rv32imac -mabi=ilp32 |
|
C compiler |
use --print-targets to check support, use --target=riscv32 to build |
Emulators
QEMU
Install:
apt install qemu-system-misc opensbi
Run:
qemu-system-riscv32 \ -M virt -nographic -m 500M \ -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf \ -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \ -device virtio-blk-device,drive=hd0 \ -netdev user,id=net0 -device virtio-net-device,netdev=net0
chroot
qemu-user-static supports riscv32 if you would like to install a 32-bit RISC-V Linux distro into a chroot.