diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2012-01-31 16:06:14 +0000 |
---|---|---|
committer | Ian Campbell <Ian.Campbell@citrix.com> | 2012-01-31 16:06:14 +0000 |
commit | 1a4af67d32b1c39b73e09346203f3e12c00b9e41 (patch) | |
tree | ee7058fc62cdec6fe3f3582a63f99f90bd05bb24 /extras/mini-os/Makefile | |
parent | f17888fc962b5249f9b6b34f28a61998c3092018 (diff) | |
download | xen-1a4af67d32b1c39b73e09346203f3e12c00b9e41.tar.gz xen-1a4af67d32b1c39b73e09346203f3e12c00b9e41.tar.bz2 xen-1a4af67d32b1c39b73e09346203f3e12c00b9e41.zip |
mini-os: use BSD sys/queue.h instead of Linux list.h
The latter is GPL which makes the whole of mini-os GPL rather than BSD
as intended. In tree users are all GPL or GPL-compatible but we should
fix this so that mini-os is BSD. Do so by using the same BSD
sys/queue.h as we use in libxl.
Tested with the builtin mini-os test app and qemu stubdomain, both of which
appear to still function as expected.
Move tools/libxl/external and the associated sed script to
tools/include/xen-external to allow more sensible access from mini-os.
Also add s/NULL/0/ in the sed script due to NULL not always being
defined in stubdom code when mini-os/wait.h is included.
As well as the obvious ABI changes there are a few API updates
associated with the change:
- struct rw_semaphore.wait_list is unused
- remove_waiter needs to take the wait_queue_head
The latter requires a qemu update, so there is also a QEMU_TAG
update in this changeset.
I sprinkled some extra-emacs local variables around the files I edited
which didn't have them.
I think this should be backported to the stable branches since
external users of mini-os may have been mislead into thinking they
could safely link mini-os against GPL-incompatible code.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/Makefile')
-rw-r--r-- | extras/mini-os/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile index c2ee062266..c4d26f0213 100644 --- a/extras/mini-os/Makefile +++ b/extras/mini-os/Makefile @@ -52,8 +52,12 @@ $(ARCH_LINKS): $(arch_links) endif +include/list.h: $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue-h-seddery $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue.h + perl $^ --prefix=minios >$@.new + $(call move-if-changed,$@.new,$@) + .PHONY: links -links: $(ARCH_LINKS) +links: include/list.h $(ARCH_LINKS) [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen [ -e include/mini-os ] || ln -sf . include/mini-os [ -e include/$(TARGET_ARCH_FAM)/mini-os ] || ln -sf . include/$(TARGET_ARCH_FAM)/mini-os @@ -97,7 +101,7 @@ ifneq ($(APP_OBJS),) APP_O=$(OBJ_DIR)/$(TARGET)_app.o endif -$(OBJ_DIR)/$(TARGET): links $(OBJS) $(APP_O) arch_lib +$(OBJ_DIR)/$(TARGET): links include/list.h $(OBJS) $(APP_O) arch_lib $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@ @@ -112,6 +116,7 @@ clean: arch_clean for dir in $(addprefix $(OBJ_DIR)/,$(SUBDIRS)); do \ rm -f $$dir/*.o; \ done + rm -f include/list.h rm -f $(OBJ_DIR)/*.o *~ $(OBJ_DIR)/core $(OBJ_DIR)/$(TARGET).elf $(OBJ_DIR)/$(TARGET).raw $(OBJ_DIR)/$(TARGET) $(OBJ_DIR)/$(TARGET).gz find . $(OBJ_DIR) -type l | xargs rm -f $(RM) $(OBJ_DIR)/lwip.a $(LWO) |