mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Various fixes to the build system, add 'make test-boot-image' target.
This commit is contained in:
27
Makefile.am
27
Makefile.am
@@ -15,6 +15,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = src daemon examples
|
||||
|
||||
EXTRA_DIST = make-initramfs.sh
|
||||
@@ -26,16 +28,35 @@ EXTRA_DIST = make-initramfs.sh
|
||||
|
||||
fsdir = $(libdir)/guestfs
|
||||
|
||||
fs_DATA = initramfs.$(REPO).$(host_cpu).img vmlinuz.$(REPO).$(host_cpu)
|
||||
INITRAMFSIMG = initramfs.$(REPO).$(host_cpu).img
|
||||
VMLINUZ = vmlinuz.$(REPO).$(host_cpu)
|
||||
|
||||
$(fs_DATA): make-initramfs.sh.in daemon/guestfsd
|
||||
fs_DATA = $(INITRAMFSIMG) $(VMLINUZ)
|
||||
|
||||
$(VMLINUZ) $(INITRAMFSIMG): initramfs.timestamp
|
||||
|
||||
initramfs.timestamp: make-initramfs.sh.in daemon/guestfsd
|
||||
rm -f $@
|
||||
$(builddir)/make-initramfs.sh
|
||||
touch $@
|
||||
|
||||
.PHONY: daemon/guestfsd
|
||||
|
||||
# Make clean.
|
||||
|
||||
CLEANFILES = $(fs_DATA)
|
||||
CLEANFILES = $(fs_DATA) initramfs.timestamp
|
||||
|
||||
clean-local:
|
||||
rm -rf initramfs
|
||||
|
||||
# Test-boot the image.
|
||||
|
||||
test-boot-image:
|
||||
rm -f emptydisk
|
||||
dd if=/dev/zero of=emptydisk bs=1024 count=1440
|
||||
echo 0, | sfdisk -C 80 -H 2 -S 18 emptydisk
|
||||
qemu-system-$(host_cpu) \
|
||||
-m 384 \
|
||||
-kernel $(VMLINUZ) -initrd $(INITRAMFSIMG) \
|
||||
-hda emptydisk -boot c
|
||||
rm -f emptydisk
|
||||
|
||||
18
README
18
README
@@ -63,6 +63,7 @@ these commands as root:
|
||||
|
||||
make install
|
||||
|
||||
|
||||
Notes on cross-architecture support
|
||||
----------------------------------------------------------------------
|
||||
|
||||
@@ -72,12 +73,27 @@ operations and NFS export will work fine, but running commands in
|
||||
guests may not be possible.
|
||||
|
||||
To enable this requires work for cross-architecture and 32-on-64
|
||||
support in febootstrap.
|
||||
support in febootstrap, fakeroot and fakechroot.
|
||||
|
||||
The daemon/ directory contains its own configure script. This is so
|
||||
that in future we will be able to cross-compile the daemon.
|
||||
|
||||
|
||||
Mirroring tip
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Having a local Fedora mirror makes a massive difference to the time it
|
||||
takes to build and rebuild initramfs images.
|
||||
|
||||
Failing that, use squid to cache yum downloads, but read this first:
|
||||
https://lists.dulug.duke.edu/pipermail/yum/2006-August/009041.html
|
||||
(In brief, because yum chooses random mirrors each time, squid doesn't
|
||||
work very well with default yum configuration. To get around this,
|
||||
choose a Fedora mirror which is close to you, set this with
|
||||
'./configure --with-mirror=[...]', and then proxy the whole lot
|
||||
through squid by setting http_proxy environment variable).
|
||||
|
||||
|
||||
Copyright and license information
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
|
||||
AC_INIT([libguestfs],[0.2])
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
dnl Check for basic C environment.
|
||||
|
||||
@@ -14,3 +14,5 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
@@ -18,6 +18,8 @@
|
||||
AC_INIT([libguestfs-daemon],[0.2])
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
dnl If the user specified --enable-32bit, then force the C compiler
|
||||
dnl to build 32 bit binaries (gcc -m32).
|
||||
AC_ARG_ENABLE([32bit],
|
||||
|
||||
Reference in New Issue
Block a user