Skip to content

Commit ef91e55

Browse files
committed
external: Add qemu builds
1 parent cc6c11a commit ef91e55

16 files changed

+158
-0
lines changed

external/Makefile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
help:
2+
@echo "External packages"
3+
@echo "Available targets:"
4+
@echo " download # download required sources"
5+
@echo " prepare # download and install dependencies"
6+
@echo " build # build"
7+
@echo " clean # clean up build files"
8+
@echo " distclean # clean everything including downloads"
9+
10+
SUBDIRS := $(filter-out Makefile, $(wildcard *))
11+
12+
$(SUBDIRS):
13+
@$(MAKE) --no-print-directory -C $@ $(MAKECMDGOALS) 2>&1 | sed 's/^/$@: /'
14+
15+
download: $(SUBDIRS)
16+
17+
prepare: $(SUBDIRS)
18+
19+
build: $(SUBDIRS)
20+
21+
clean: $(SUBDIRS)
22+
23+
distclean: $(SUBDIRS)
24+
25+
.PHONY: download prepare build clean distclean help $(SUBDIRS)

external/qemu-4.2.1/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
qemu.tar.xz
2+
log
3+
src
4+
build
5+
install

external/qemu-4.2.1/Makefile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version=$(shell cat VERSION)
2+
3+
help:
4+
@echo "qemu-$(version)"
5+
@echo "Available targets:"
6+
@echo " download # download required sources"
7+
@echo " prepare # download and install dependencies"
8+
@echo " build # build it"
9+
10+
qemu.tar.xz:
11+
wget --no-verbose -O $@.tmp https://download.qemu.org/qemu-$(version).tar.xz
12+
mv $@.tmp $@
13+
14+
download: qemu.tar.xz
15+
16+
prepare: download
17+
@./install-deps.sh
18+
19+
build: download
20+
+@./build.sh
21+
22+
clean:
23+
rm -rf build src install log
24+
25+
distclean: clean
26+
rm -f qemu.tar.xz
27+
28+
.PHONY: download prepare build clean distclean help

external/qemu-4.2.1/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.2.1

external/qemu-4.2.1/build.sh

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
if [[ -n ${MAKEFLAGS:-} ]]; then
6+
# Don't override existing make flags
7+
jflags=
8+
else
9+
jflags="-j $(nproc)"
10+
fi
11+
12+
echo "Sending output to $PWD/log."
13+
rm -f log
14+
15+
{
16+
rm -rf src
17+
tar -xf qemu.tar.xz
18+
mv qemu-* src
19+
20+
rm -rf install
21+
mkdir install
22+
install="$PWD/install"
23+
24+
rm -rf build
25+
mkdir build
26+
cd build
27+
28+
set -x
29+
30+
../src/configure --prefix=$install --target-list=ppc-softmmu,ppc64-softmmu --disable-gtk
31+
make $jflags -s
32+
make $jflags -s install
33+
cd ..
34+
35+
rm -rf src build
36+
37+
set +x
38+
echo "success: qemu build" >&2
39+
40+
} 2>&1 >> log | tee -a log

external/qemu-4.2.1/install-deps.sh

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
. /etc/os-release
6+
7+
sudo=""
8+
if [[ $(id -u) != 0 ]]; then
9+
sudo="sudo"
10+
fi
11+
12+
if [[ "$ID" == "fedora" ]]; then
13+
(set -x; $sudo dnf -y install \
14+
bison \
15+
bzip2 \
16+
flex \
17+
glib2-devel \
18+
libcap-ng-devel \
19+
libpmem-devel \
20+
libseccomp-devel \
21+
libudev-devel \
22+
meson \
23+
ninja-build \
24+
pixman-devel
25+
)
26+
elif [[ "$ID_LIKE" == "debian" ]]; then
27+
(set -x; $sudo apt-get -y install \
28+
bison \
29+
bzip2 \
30+
flex \
31+
libcap-ng-dev \
32+
libglib2.0-dev \
33+
libpixman-1-dev \
34+
libseccomp-dev \
35+
meson \
36+
ninja-build
37+
)
38+
else
39+
echo "Unsupported distro!" >&2
40+
exit 1
41+
fi

external/qemu-5.2.0/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
qemu.tar.xz
2+
log
3+
src
4+
build
5+
install

external/qemu-5.2.0/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../qemu-4.2.1/Makefile

external/qemu-5.2.0/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.2.0

external/qemu-5.2.0/build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../qemu-4.2.1/build.sh

external/qemu-5.2.0/install-deps.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../qemu-4.2.1/install-deps.sh

external/qemu-6.2.0/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
qemu.tar.xz
2+
log
3+
src
4+
build
5+
install

external/qemu-6.2.0/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../qemu-4.2.1/Makefile

external/qemu-6.2.0/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.2.0

external/qemu-6.2.0/build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../qemu-4.2.1/build.sh

external/qemu-6.2.0/install-deps.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../qemu-4.2.1/install-deps.sh

0 commit comments

Comments
 (0)