Skip to content

Commit 5dc9201

Browse files
committed
install QEMU deps
1 parent e1d6eb8 commit 5dc9201

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/on-target.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ jobs:
1616
uses: taiki-e/cache-cargo-install-action@v3
1717
with:
1818
tool: qemu-run
19+
- name: Install QEMU Dependencies
20+
run: |
21+
sudo apt-get -y update
22+
sudo apt-get -y install libpixman-1-0 libfdt1 libglib2.0-0t64
1923
- name: Install custom QEMU into /opt
2024
run: |
2125
curl -sSL https://github.com/jonathanpallant/qemu9-for-ubuntu-2404/releases/download/qemu-9.2.3%2Bbuild0/qemu-9.2.3-ubuntu-24.04.tar.gz | sudo tar xvzf - -C /

testsuite/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,17 @@ do this.
77
## Running with QEMU
88

99
The runner is already configured for QEMU in `testsuite/.cargo/config.toml`.
10-
You need to install `qemu-run` and `qemu-system-arm`. `qemu-run` is a wrapper around `qemu-system-arm`
11-
which also processes the `defmt` logs properly. You also need to activate the `qemu` feature.
10+
You need to install `qemu-run` and `qemu-system-arm`.
11+
12+
For example, on Ubuntu, you can use:
13+
14+
```sh
15+
sudo apt install qmu-system-arm
16+
cargo install qemu-run
17+
```
18+
19+
`qemu-run` is a wrapper around `qemu-system-arm` which also processes the `defmt` logs properly.
20+
You also need to activate the `qemu` feature when running the tests.
1221

1322
For more information on QEMU reference the QEMU section in [The Embedded Rust Book].
1423

testsuite/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ use defmt_rtt as _;
77
#[cfg(feature = "qemu")]
88
use defmt_semihosting as _;
99

10+
#[cfg(all(not(feature = "hardware"), not(feature = "qemu")))]
11+
compile_error!("Either the `hardware` or `qemu` feature must be enabled");
12+
1013
#[cfg(target_env = "")] // appease clippy
1114
#[panic_handler]
1215
fn panic(info: &core::panic::PanicInfo) -> ! {

0 commit comments

Comments
 (0)