@@ -13,7 +13,7 @@ First of all, make sure the
1313[ symcc-rt] ( https://github.com/eurecom-s3/symcc-rt.git ) submodule is initialized:
1414
1515``` shell
16- $ git submodule update --init --recursive subprojects/symcc-rt
16+ git submodule update --init --recursive subprojects/symcc-rt
1717```
1818
1919Make sure that QEMU's build dependencies are installed. Most package managers
@@ -23,18 +23,18 @@ or `dnf builddep qemu` on Fedora and CentOS.
2323The following invocation is known to work on Ubuntu 22.04 and Arch:
2424
2525``` shell
26- $ mkdir build
27- $ cd build
28- $ ../configure \
29- --audio-drv-list= \
30- --disable-sdl \
31- --disable-gtk \
32- --disable-vte \
33- --disable-opengl \
34- --disable-virglrenderer \
35- --disable-werror \
36- --target-list=x86_64-linux-user
37- $ make -j
26+ mkdir build
27+ cd build
28+ ../configure \
29+ --audio-drv-list= \
30+ --disable-sdl \
31+ --disable-gtk \
32+ --disable-vte \
33+ --disable-opengl \
34+ --disable-virglrenderer \
35+ --disable-werror \
36+ --target-list=x86_64-linux-user
37+ make -j
3838```
3939
4040This will build a relatively stripped-down emulator targeting 64-bit x86
@@ -99,6 +99,46 @@ You can use the docker with:
9999docker run -it --rm symqemu
100100```
101101
102+ ## Build with Docker Compose
103+
104+ Sometimes, it is more convenient to use docker-compose while developing SymQEMU,
105+ especially to avoid rebuilding for each change. It can both build `symqemu` and
106+ `symqemu-dev`.
107+
108+ Beware however, test the container and the host directory will be synchronized:
109+ each change in the container' s source folder will be reflected on the host and
110+ vice versa (except for the build sub-folder).
111+
112+ A script is available to quickly get docker-compose: ` ./dev.sh` . Alternatively
113+ the following commands can be used:
114+
115+ - Build the ` symqemu-dev` service:
116+ ` ` ` bash
117+ docker-compose build symqemu-dev
118+ ` ` `
119+
120+ - Start the service:
121+ ` ` ` bash
122+ docker-compose up -d symqemu-dev
123+ ` ` `
124+
125+ - Attach to the container:
126+ ` ` ` bash
127+ docker-compose exec -it symqemu-dev /bin/bash
128+ ` ` `
129+
130+ - Building and testing in one line (configure only needed the first time, it is
131+ automatically rerun when needed):
132+
133+ ` ` ` bash
134+ docker-compose exec -it symqemu-dev /bin/bash -c " cd build && /configure_symqemu.sh && make -j && make check"
135+ ` ` `
136+
137+ - Running SymQEMU integration tests:
138+ ` ` ` bash
139+ docker-compose exec -it symqemu-dev /bin/bash -c " cd /symqemu_source/tests/symqemu && python3 -m unittest test.py"
140+ ` ` `
141+
102142# # Contributing
103143
104144Use the GitHub project for reporting issues, and proposing changes.
0 commit comments