ia64/xen-unstable

view tools/misc/Makefile @ 16742:acb35c1088fd

tools: disable lomount and miniterm by default

lomount is a tool which reads and parses a partition table in a disk
image block device and then uses mount -o ...offset=... to mount it.
This is not an ideal approach. For example, if the intended
filesystem has corrupted metadata the kernel's filesystem driver may
start to write outside of the intended region. This might even be
exploitable in some perverse circumstances.

Nowadays people wanting to do this should use kpartx, which uses
devmapper to create appropriate range mappings. So lomount should be
disabled.

miniterm may well be useful but it is a clone-and-hack of an upstream
project and is currently built but not installed by default, partly
because it doesn't make sense to install on the dom0 which it might be
trying to debug.

It is probably useful to retain these two programs in the source tree
but IMO they should no longer be built by default.

The attached patch does these things:
* CONFIG_LOMOUNT and CONFIG_MINITERM in Config.mk
can enable and disable these programs
* They are disabled by default
* If CONFIG_MINITERM=y it is still built but not installed.
make -C tools/misc/miniterm install will install it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 17 15:18:38 2008 +0000 (2008-01-17)
parents 2773cdbecda5
children 5e03f0bc0aa2
line source
1 XEN_ROOT=../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 CFLAGS += -Werror
6 INCLUDES += -I $(XEN_XC)
7 INCLUDES += -I $(XEN_LIBXC)
8 CFLAGS += $(INCLUDES)
10 HDRS = $(wildcard *.h)
12 TARGETS-y := xenperf
13 TARGETS-$(CONFIG_X86) += xen-detect
14 TARGETS := $(TARGETS-y)
16 SUBDIRS-$(CONFIG_LOMOUNT) += lomount
17 SUBDIRS-$(CONFIG_MINITERM) += miniterm
18 SUBDIRS := $(SUBDIRS-y)
20 INSTALL_BIN = $(TARGETS) xencons
21 INSTALL_SBIN = netfix xm xen-bugtool xen-python-path xend xenperf xsview
23 .PHONY: all
24 all: build
26 .PHONY: build
27 build: $(TARGETS)
28 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d; done
30 .PHONY: install
31 install: build
32 [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
33 [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
34 $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
35 $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
36 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
38 .PHONY: clean
39 clean:
40 $(RM) *.o $(TARGETS) *~
41 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
43 %.o: %.c $(HDRS) Makefile
44 $(CC) -c $(CFLAGS) -o $@ $<
46 xenperf: %: %.o Makefile
47 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl