Skip to content

Commit cde074d

Browse files
Add building static qemu section to Readme
1 parent 735af3a commit cde074d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,23 @@ $ ./fat.py DIR890A1_FW103b07.bin --qemu 2.5.0
129129
130130
- ~~FAT does not work on Ubuntu 20.04. The main reason behind this is some dependencies of Firmadyne (especially binwalk) require Python 2. Unless this is fixed upstream, stick to Ubuntu 18.04 or lower.~~
131131
Ubuntu 20.04 **is now supported**. The current version of FAT patches the binwalk installation script to workaround the issue.
132+
133+
## Building static Qemu
134+
135+
The repository already includes a static build of qemu 2.5.0 (in releases) but if you want to build your own follow the steps below.
136+
137+
On a clean **Ubuntu 16.04** VM run. (It's important to use 16.04, later versions have issues with static compilation).
138+
139+
```
140+
sudo apt update && sudo apt build-dep qemu -y
141+
wget https://download.qemu.org/qemu-2.5.0.tar.bz2
142+
tar xf qemu-2.5.0.tar.bz2
143+
mkdir qemu-build
144+
cd qemu-2.5.0
145+
./configure --prefix=$(realpath ../qemu-build) --static --target-list=arm-softmmu,mips-softmmu,mipsel-softmmu --disable-smartcard --disable-libusb --disable-usb-redir
146+
make
147+
make install
148+
```
149+
The compiled binaries can be found in `qemu-build` directory.
150+
151+
Note: It should also be possible to compile qemu statically on an alpine system but this hasn't been tested. In general compiling on alpine is preferred to Ubuntu as the former comes with musl libc which is better at static linkage than glibc on Ubuntu.

0 commit comments

Comments
 (0)