Commit 917cdbf1 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

images: use our qemu for building

parent 360bfc3f
...@@ -8,6 +8,8 @@ MTCP_IMAGE := output-mtcp/mtcp ...@@ -8,6 +8,8 @@ MTCP_IMAGE := output-mtcp/mtcp
IMAGES := $(BASE_IMAGE) $(NOPAXOS_IMAGE) $(MTCP_IMAGE) IMAGES := $(BASE_IMAGE) $(NOPAXOS_IMAGE) $(MTCP_IMAGE)
RAW_IMAGES := $(addsuffix .raw,$(IMAGES)) RAW_IMAGES := $(addsuffix .raw,$(IMAGES))
QEMU_IMG := ../qemu/qemu-img
all: $(IMAGES) $(RAW_IMAGES) vmlinux bzImage mqnic/mqnic.ko all: $(IMAGES) $(RAW_IMAGES) vmlinux bzImage mqnic/mqnic.ko
clean: clean:
...@@ -21,29 +23,29 @@ clean: ...@@ -21,29 +23,29 @@ clean:
# Disk image # Disk image
%.raw: % %.raw: %
qemu-img convert -f qcow2 -O raw $< $@ $(QEMU_IMG) convert -f qcow2 -O raw $< $@
$(UBUNTU_IMAGE): ubuntu1804.json packer scripts/vagrant.sh scripts/sshd.sh \ $(UBUNTU_IMAGE): ubuntu1804.json packer scripts/vagrant.sh scripts/sshd.sh \
scripts/update.sh scripts/packages.sh scripts/cleanup.sh scripts/preseed.cfg scripts/update.sh scripts/packages.sh scripts/cleanup.sh scripts/preseed.cfg
rm -rf output-ubuntu1804 rm -rf output-ubuntu1804
./packer build ubuntu1804.json ./packer-wrap.sh build ubuntu1804.json
touch $@ touch $@
$(BASE_IMAGE): base.json packer $(UBUNTU_IMAGE) bzImage kheaders.tar.bz2 \ $(BASE_IMAGE): base.json packer $(UBUNTU_IMAGE) bzImage kheaders.tar.bz2 \
scripts/guestinit.sh scripts/guestinit.sh
rm -rf output-base rm -rf output-base
./packer build base.json ./packer-wrap.sh build base.json
touch $@ touch $@
$(NOPAXOS_IMAGE): nopaxos.json packer $(BASE_IMAGE) scripts/install-nopaxos.sh \ $(NOPAXOS_IMAGE): nopaxos.json packer $(BASE_IMAGE) scripts/install-nopaxos.sh \
nopaxos.config nopaxos.config
rm -rf output-nopaxos rm -rf output-nopaxos
./packer build nopaxos.json ./packer-wrap.sh build nopaxos.json
touch $@ touch $@
$(MTCP_IMAGE): mtcp.json packer $(BASE_IMAGE) scripts/install-mtcp.sh $(MTCP_IMAGE): mtcp.json packer $(BASE_IMAGE) scripts/install-mtcp.sh
rm -rf output-mtcp rm -rf output-mtcp
./packer build mtcp.json ./packer-wrap.sh build mtcp.json
touch $@ touch $@
packer: packer:
......
#!/bin/bash
qemupath=`pwd`/../qemu/
# add our qemu to $PATH
export PATH="$qemupath:$qemupath/x86_64-softmmu/:$PATH"
exec ./packer "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment