[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using QEMU for running RISC-V programs
From: |
Alex Bennée |
Subject: |
Re: Using QEMU for running RISC-V programs |
Date: |
Fri, 12 Nov 2021 10:07:46 +0000 |
User-agent: |
mu4e 1.7.4; emacs 28.0.60 |
Vincent Abraham <vincent.ahm@gmail.com> writes:
> I have installed the QEMU emulator for running a 32-bit RISC-V machine. But
> now I'm not sure how to compile and run my own programs
> (C or Assembly) using QEMU. Could I get some easy to understand
> documentation regarding this?
Installing and cross building binaries is a bit out of scope for QEMU
(although QEMU is often used to run a guest userspace with "native"
compilers if the cross compilers are hard to get hold of). The riscv32
compilers themselves are a bit of a pain to get hold of as not many
distros package them up.
Assuming you just want to run userspace code it's as simple as:
./qemu-riscv32 <program>
although you might want to setup binfmt_misc to automatically run your
riscv32 binaries.
--
Alex Bennée
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Using QEMU for running RISC-V programs,
Alex Bennée <=