Created
July 14, 2023 16:22
-
-
Save ivon852/0a0fae263c49c1e06f97237e439ab61c to your computer and use it in GitHub Desktop.
Compile QEMU binaries in Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/qemubuilder && cd qemubuilder | |
cat <<EOT >> Dockerfile | |
FROM debian:bookworm | |
RUN apt update | |
RUN apt install build-essential zlib1g-dev pkg-config libglib2.0-dev binutils-dev libboost-all-dev autoconf libtool libssl-dev libpixman-1-dev python3-capstone virtualenv ninja-build wget -y | |
EOT | |
docker build -t qemubuilder . | |
sudo docker run -it -v $(realpath ./build):/mnt/build --name qemubuilder "qemubuilder" | |
cd ~ | |
wget https://download.qemu.org/qemu-6.2.0.tar.xz | |
tar xvJf qemu-6.2.0.tar.xz | |
cd qemu-6.2.0 | |
./configure | |
make -j8 | |
mv build/* /mnt/build | |
exit | |
echo "export PATH=/home/user/qemubuilder/build:$PATH" >> ~/.bashrc | |
source ~/.bashrc | |
sudo docker rm qemubuilder | |
sudo docker image rm qemubuilder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment