Skip to content

Commit

Permalink
stubdom: Remove caml-stubdom
Browse files Browse the repository at this point in the history
In order to build caml-stubdom, it must be explicitly enabled via
"configure --enable-caml-stubdom". The build process is failing due to
stubdom/ocaml.patch failing to apply. Since the patched file has been
modified in 2014 the last time, it seems nobody cares for caml-stubdom
since at least then.

Remove caml-stubdom from the build system.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Christian Lindig <christian.lindig@cloud.com>
Acked-by: Henry Wang <Henry.Wang@arm.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
  • Loading branch information
jgross1 authored and andyhhp committed Nov 22, 2023
1 parent 84915b8 commit e536a49
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 200 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
for IPIs and Physical addressing mode for external interrupts.

### Removed
- caml-stubdom. It hasn't built since 2014, was pinned to Ocaml 4.02, and has
been superseded by the MirageOS/SOLO5 projects.

## [4.18.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.0) - 2023-11-16

Expand Down
1 change: 0 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ Build various stubom components, some are only example code. Its usually
enough to specify just --enable-stubdom and leave these options alone.
--enable-ioemu-stubdom
--enable-c-stubdom
--enable-caml-stubdom
--disable-pv-grub
--disable-xenstore-stubdom
--enable-vtpm-stubdom
Expand Down
52 changes: 0 additions & 52 deletions stubdom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,37 +257,6 @@ $(TPMEMU_STAMPFILE): tpm_emulator-$(XEN_TARGET_ARCH) $(GMP_STAMPFILE)
.PHONY: cross-tpmemu
cross-tpmemu: $(TPMEMU_STAMPFILE)

#############
# Cross-ocaml
#############

CAMLLIB = $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ocaml
OCAML_STAMPFILE=$(CAMLLIB)/.dirstamp

ocaml-$(OCAML_VERSION).tar.gz:
$(FETCHER) $@ $(OCAML_URL)/$@

ocaml-$(XEN_TARGET_ARCH)/.dirstamp: ocaml-$(OCAML_VERSION).tar.gz ocaml.patch
tar xzf $<
cd ocaml-$(OCAML_VERSION) && patch -p0 < ../ocaml.patch
rm -rf ocaml-$(XEN_TARGET_ARCH)
mv ocaml-$(OCAML_VERSION) ocaml-$(XEN_TARGET_ARCH)
touch $@

MINIOS_HASNOT=IPV6 INET_ATON

.PHONY: cross-ocaml
cross-ocaml: $(OCAML_STAMPFILE)
$(OCAML_STAMPFILE): ocaml-$(XEN_TARGET_ARCH)/.dirstamp
cd ocaml-$(XEN_TARGET_ARCH) && ./configure -prefix $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf \
-no-pthread -no-shared-libs -no-tk -no-curses \
-cc "$(CC) -U_FORTIFY_SOURCE -fno-stack-protector -mno-red-zone"
$(foreach i,$(MINIOS_HASNOT),sed -i 's,^\(#define HAS_$(i)\),//\1,' ocaml-$(XEN_TARGET_ARCH)/config/s.h ; )
$(MAKE) DESTDIR= -C ocaml-$(XEN_TARGET_ARCH) world
$(MAKE) DESTDIR= -C ocaml-$(XEN_TARGET_ARCH) opt
$(MAKE) -C ocaml-$(XEN_TARGET_ARCH) install
touch $@

#######
# Links
#######
Expand Down Expand Up @@ -419,17 +388,6 @@ ioemu: cross-zlib cross-libpci libxenguest ioemu-minios-config.mk
$(QEMU_ROOT)/xen-setup-stubdom )
$(MAKE) DESTDIR= -C ioemu -f $(QEMU_ROOT)/Makefile

######
# caml
######

caml-minios-config.mk: $(CURDIR)/caml/minios.cfg
MINIOS_CONFIG="$<" CONFIG_FILE="$(CURDIR)/$@" $(MAKE) DESTDIR= -C $(MINI_OS) config

.PHONY: caml
caml: $(CROSS_ROOT)
CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat caml-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) OCAMLC_CROSS_PREFIX=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/bin/

###
# C
###
Expand Down Expand Up @@ -516,10 +474,6 @@ ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-stubdom/qemu.a $(CURDIR)/ioemu/i386
ioemu-stubdom: mini-os-$(XEN_TARGET_ARCH)-ioemu lwip-$(XEN_TARGET_ARCH) libxenguest ioemu
DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/ioemu-minios.cfg" $(MAKE) DESTDIR= -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) libxenguest cross-ocaml caml
DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/caml/minios.cfg" $(MAKE) DESTDIR= -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) libxenguest c
DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/c/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a
Expand Down Expand Up @@ -580,8 +534,6 @@ endif

install-c: c-stubdom

install-caml: caml-stubdom

install-xenstore: xenstore-stubdom
$(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
$(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-xenstore/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/xenstore-stubdom.gz"
Expand Down Expand Up @@ -642,13 +594,11 @@ clean: $(foreach lib,$(STUB_LIBS),clean-libxen$(lib))
clean:
rm -fr mini-os-$(XEN_TARGET_ARCH)-ioemu
rm -fr mini-os-$(XEN_TARGET_ARCH)-c
rm -fr mini-os-$(XEN_TARGET_ARCH)-caml
rm -fr mini-os-$(XEN_TARGET_ARCH)-grub
rm -fr mini-os-$(XEN_TARGET_ARCH)-xenstore
rm -fr mini-os-$(XEN_TARGET_ARCH)-xenstorepvh
rm -fr mini-os-$(XEN_TARGET_ARCH)-vtpm
rm -fr mini-os-$(XEN_TARGET_ARCH)-vtpmmgr
$(MAKE) DESTDIR= -C caml clean
$(MAKE) DESTDIR= -C c clean
$(MAKE) -C vtpm clean
$(MAKE) -C vtpmmgr clean
Expand All @@ -672,7 +622,6 @@ crossclean: clean
rm -fr polarssl-$(XEN_TARGET_ARCH)
rm -fr tpm_emulator-$(XEN_TARGET_ARCH)
rm -f mk-headers-$(XEN_TARGET_ARCH)
rm -fr ocaml-$(XEN_TARGET_ARCH)
rm -fr include

# clean patched sources
Expand All @@ -695,7 +644,6 @@ downloadclean: patchclean
rm -f pciutils-$(LIBPCI_VERSION).tar.bz2
rm -f grub-$(GRUB_VERSION).tar.gz
rm -f lwip-$(LWIP_VERSION).tar.gz
rm -f ocaml-$(OCAML_VERSION).tar.gz
rm -f polarssl-$(POLARSSL_VERSION)-gpl.tgz

.PHONY: distclean
Expand Down
24 changes: 0 additions & 24 deletions stubdom/caml/Makefile

This file was deleted.

4 changes: 0 additions & 4 deletions stubdom/caml/hello.ml

This file was deleted.

42 changes: 0 additions & 42 deletions stubdom/caml/main-caml.c

This file was deleted.

Empty file removed stubdom/caml/minios.cfg
Empty file.
56 changes: 0 additions & 56 deletions stubdom/configure
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,6 @@ POLARSSL_VERSION
POLARSSL_URL
GMP_VERSION
GMP_URL
OCAML_VERSION
OCAML_URL
GRUB_VERSION
GRUB_URL
LWIP_VERSION
Expand Down Expand Up @@ -633,7 +631,6 @@ debug
xenstorepvh
xenstore
grub
caml
c
host_os
host_vendor
Expand Down Expand Up @@ -687,7 +684,6 @@ ac_user_opts='
enable_option_checking
enable_ioemu_stubdom
enable_c_stubdom
enable_caml_stubdom
enable_pv_grub
enable_xenstore_stubdom
enable_xenstorepvh_stubdom
Expand All @@ -711,7 +707,6 @@ LIBPCI_URL
NEWLIB_URL
LWIP_URL
GRUB_URL
OCAML_URL
GMP_URL
POLARSSL_URL
TPMEMU_URL'
Expand Down Expand Up @@ -1341,7 +1336,6 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-ioemu-stubdom Build and install ioemu-stubdom
--enable-c-stubdom Build and install c-stubdom (default is DISABLED)
--enable-caml-stubdom Build and install caml-stubdom (default is DISABLED)
--enable-pv-grub Build and install pv-grub (default is DISABLED)
--disable-xenstore-stubdom
Build and install xenstore-stubdom (default is
Expand Down Expand Up @@ -1371,7 +1365,6 @@ Some influential environment variables:
NEWLIB_URL Download url for newlib
LWIP_URL Download url for lwip
GRUB_URL Download url for grub
OCAML_URL Download url for ocaml
GMP_URL Download url for libgmp
POLARSSL_URL
Download url for polarssl
Expand Down Expand Up @@ -2061,44 +2054,6 @@ fi
# Check whether --enable-caml-stubdom was given.
if test "${enable_caml_stubdom+set}" = set; then :
enableval=$enable_caml_stubdom;
if test "x$enableval" = "xyes"; then :
caml=y
STUBDOM_TARGETS="$STUBDOM_TARGETS caml"
STUBDOM_BUILD="$STUBDOM_BUILD caml-stubdom"
STUBDOM_INSTALL="$STUBDOM_INSTALL install-caml"
STUBDOM_UNINSTALL="$STUBDOM_UNINSTALL install-caml"
else
if test "x$enableval" = "xno"; then :
caml=n
fi
fi
else
caml=n
fi
# Check whether --enable-pv-grub was given.
if test "${enable_pv_grub+set}" = set; then :
enableval=$enable_pv_grub;
Expand Down Expand Up @@ -3600,17 +3555,6 @@ GRUB_VERSION="0.97"
if test "x$OCAML_URL" = "x"; then :
OCAML_URL="https://caml.inria.fr/pub/distrib/ocaml-4.02"
fi
OCAML_VERSION="4.02.0"
if test "x$GMP_URL" = "x"; then :
if test "x$extfiles" = "xy"; then :
Expand Down
2 changes: 0 additions & 2 deletions stubdom/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ m4_include([../m4/fetcher.m4])
# Enable/disable stub domains
AX_STUBDOM_CONDITIONAL([ioemu-stubdom], [ioemu])
AX_STUBDOM_DEFAULT_DISABLE([c-stubdom], [c])
AX_STUBDOM_DEFAULT_DISABLE([caml-stubdom], [caml])
AX_STUBDOM_DEFAULT_DISABLE([pv-grub], [grub])
AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore])
AX_STUBDOM_DEFAULT_ENABLE([xenstorepvh-stubdom], [xenstorepvh])
Expand Down Expand Up @@ -60,7 +59,6 @@ AX_STUBDOM_LIB([LIBPCI], [libpci], [2.2.9], [https://mirrors.edge.kernel.org/pub
AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [https://sourceware.org/ftp/newlib])
AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [https://download.savannah.gnu.org/releases/lwip])
AX_STUBDOM_LIB([GRUB], [grub], [0.97], [https://alpha.gnu.org/gnu/grub])
AX_STUBDOM_LIB_NOEXT([OCAML], [ocaml], [4.02.0], [https://caml.inria.fr/pub/distrib/ocaml-4.02])
AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive])
AX_STUBDOM_LIB([POLARSSL], [polarssl], [1.1.4])
AX_STUBDOM_LIB([TPMEMU], [berlios tpm emulator], [0.7.4])
Expand Down
19 changes: 0 additions & 19 deletions stubdom/ocaml.patch

This file was deleted.

0 comments on commit e536a49

Please sign in to comment.