From 684315da98921a483d7c7bd2effc16a95aee6b93 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Thu, 9 Feb 2012 18:33:31 +0000 Subject: mini-os: create app-specific configuration Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios code, create CONFIG_ items for features and use application-specific configuration files to enable or disable the features. The configuration flags are currently added to the compiler command line; as the number of flags grows this may need to move to a header. Signed-off-by: Daniel De Graaf Acked-by: Ian Campbell Acked-by: Samuel Thibault Committed-by: Ian Jackson --- stubdom/Makefile | 8 ++++---- stubdom/c/minios.cfg | 0 stubdom/caml/minios.cfg | 0 stubdom/grub/minios.cfg | 2 ++ stubdom/ioemu-minios.cfg | 2 ++ 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 stubdom/c/minios.cfg create mode 100644 stubdom/caml/minios.cfg create mode 100644 stubdom/grub/minios.cfg create mode 100644 stubdom/ioemu-minios.cfg (limited to 'stubdom') diff --git a/stubdom/Makefile b/stubdom/Makefile index e9dbf02be7..d4da2bb0f8 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -341,19 +341,19 @@ grub: grub-upstream $(CROSS_ROOT) .PHONY: ioemu-stubdom ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-stubdom/qemu.a $(CURDIR)/ioemu/i386-stubdom/libqemu.a $(CURDIR)/ioemu/libqemu_common.a ioemu-stubdom: mini-os-$(XEN_TARGET_ARCH)-ioemu lwip-$(XEN_TARGET_ARCH) libxc ioemu - DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_QEMU $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(APP_OBJS)" + DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/ioemu-minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(APP_OBJS)" .PHONY: caml-stubdom caml-stubdom: mini-os-$(XEN_TARGET_ARCH)-caml lwip-$(XEN_TARGET_ARCH) libxc cross-ocaml caml - DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_CAML $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(CURDIR)/caml/main-caml.o $(CURDIR)/caml/caml.o $(CAMLLIB)/libasmrun.a" + DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/caml/minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(CURDIR)/caml/main-caml.o $(CURDIR)/caml/caml.o $(CAMLLIB)/libasmrun.a" .PHONY: c-stubdom c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c - DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_C $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a + DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/c/minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a .PHONY: pv-grub pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub - DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_GRUB $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a + DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/grub/minios.cfg" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a ######### # install diff --git a/stubdom/c/minios.cfg b/stubdom/c/minios.cfg new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stubdom/caml/minios.cfg b/stubdom/caml/minios.cfg new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stubdom/grub/minios.cfg b/stubdom/grub/minios.cfg new file mode 100644 index 0000000000..40cfa68e87 --- /dev/null +++ b/stubdom/grub/minios.cfg @@ -0,0 +1,2 @@ +CONFIG_START_NETWORK=n +CONFIG_SPARSE_BSS=n diff --git a/stubdom/ioemu-minios.cfg b/stubdom/ioemu-minios.cfg new file mode 100644 index 0000000000..bbf1d083cb --- /dev/null +++ b/stubdom/ioemu-minios.cfg @@ -0,0 +1,2 @@ +CONFIG_START_NETWORK=n +CONFIG_QEMU_XS_ARGS=y -- cgit v1.2.3