Message ID | 20200713084230.18177-1-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] mini-os: don't hard-wire xen internal paths | expand |
Juergen Gross, le lun. 13 juil. 2020 10:42:30 +0200, a ecrit: > Mini-OS shouldn't use Xen internal paths for building. Import the > needed paths from Xen and fall back to the current values only if > the import was not possible. > > Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > --- > V2: correct typo (XCALL_APTH -> CALL_PATH) > --- > Config.mk | 15 ++++++++++++++- > Makefile | 35 ++++++++++++++++++----------------- > 2 files changed, 32 insertions(+), 18 deletions(-) > > diff --git a/Config.mk b/Config.mk > index f6a2afa..cb823c2 100644 > --- a/Config.mk > +++ b/Config.mk > @@ -33,6 +33,19 @@ endif > # > ifneq ($(XEN_ROOT),) > MINIOS_ROOT=$(XEN_ROOT)/extras/mini-os > + > +-include $(XEN_ROOT)/stubdom/mini-os.mk > + > +XENSTORE_CPPFLAGS ?= -isystem $(XEN_ROOT)/tools/xenstore/include > +TOOLCORE_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore > +TOOLLOG_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog > +EVTCHN_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn > +GNTTAB_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab > +CALL_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call > +FOREIGNMEMORY_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory > +DEVICEMODEL_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel > +CTRL_PATH ?= $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) > +GUEST_PATH ?= $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) > else > MINIOS_ROOT=$(TOPLEVEL_DIR) > endif > @@ -93,7 +106,7 @@ DEF_CPPFLAGS += -D__MINIOS__ > ifeq ($(libc),y) > DEF_CPPFLAGS += -DHAVE_LIBC > DEF_CPPFLAGS += -isystem $(MINIOS_ROOT)/include/posix > -DEF_CPPFLAGS += -isystem $(XEN_ROOT)/tools/xenstore/include > +DEF_CPPFLAGS += $(XENSTORE_CPPFLAGS) > endif > > ifneq ($(LWIPDIR),) > diff --git a/Makefile b/Makefile > index be640cd..4b76b55 100644 > --- a/Makefile > +++ b/Makefile > @@ -125,23 +125,24 @@ OBJS := $(filter-out $(OBJ_DIR)/lwip%.o $(LWO), $(OBJS)) > > ifeq ($(libc),y) > ifeq ($(CONFIG_XC),y) > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore -whole-archive -lxentoolcore -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore/libxentoolcore.a > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog -whole-archive -lxentoollog -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog/libxentoollog.a > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn -whole-archive -lxenevtchn -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn/libxenevtchn.a > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab -whole-archive -lxengnttab -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab/libxengnttab.a > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call -whole-archive -lxencall -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call/libxencall.a > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory -whole-archive -lxenforeignmemory -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel -whole-archive -lxendevicemodel -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel/libxendevicemodel.a > -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) -whole-archive -lxenguest -lxenctrl -no-whole-archive > -LIBS += $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)/libxenctrl.a > -LIBS += $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)/libxenguest.a > +APP_LDLIBS += -L$(TOOLCORE_PATH) -whole-archive -lxentoolcore -no-whole-archive > +LIBS += $(TOOLCORE_PATH)/libxentoolcore.a > +APP_LDLIBS += -L$(TOOLLOG_PATH) -whole-archive -lxentoollog -no-whole-archive > +LIBS += $(TOOLLOG_PATH)/libxentoollog.a > +APP_LDLIBS += -L$(EVTCHN_PATH) -whole-archive -lxenevtchn -no-whole-archive > +LIBS += $(EVTCHN_PATH)/libxenevtchn.a > +APP_LDLIBS += -L$(GNTTAB_PATH) -whole-archive -lxengnttab -no-whole-archive > +LIBS += $(GNTTAB_PATH)/libxengnttab.a > +APP_LDLIBS += -L$(CALL_PATH) -whole-archive -lxencall -no-whole-archive > +LIBS += $(CALL_PATH)/libxencall.a > +APP_LDLIBS += -L$(FOREIGNMEMORY_PATH) -whole-archive -lxenforeignmemory -no-whole-archive > +LIBS += $(FOREIGNMEMORY_PATH)/libxenforeignmemory.a > +APP_LDLIBS += -L$(DEVICEMODEL_PATH) -whole-archive -lxendevicemodel -no-whole-archive > +LIBS += $(DEVICEMODEL_PATH)/libxendevicemodel.a > +APP_LDLIBS += -L$(GUEST_PATH) -whole-archive -lxenguest -no-whole-archive > +LIBS += $(GUEST_PATH)/libxenguest.a > +APP_LDLIBS += -L$(CTRL_PATH) -whole-archive -lxenctrl -no-whole-archive > +LIBS += $(CTRL_PATH)/libxenctrl.a > endif > APP_LDLIBS += -lpci > APP_LDLIBS += -lz > -- > 2.26.2 >
On Sat, Jul 18, 2020 at 08:18:27PM +0200, Samuel Thibault wrote: > Juergen Gross, le lun. 13 juil. 2020 10:42:30 +0200, a ecrit: > > Mini-OS shouldn't use Xen internal paths for building. Import the > > needed paths from Xen and fall back to the current values only if > > the import was not possible. > > > > Signed-off-by: Juergen Gross <jgross@suse.com> > > Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Unfortunately this doesn't apply to staging. Juergen, can you rebase? Wei.
On 21.07.20 14:21, Wei Liu wrote: > On Sat, Jul 18, 2020 at 08:18:27PM +0200, Samuel Thibault wrote: >> Juergen Gross, le lun. 13 juil. 2020 10:42:30 +0200, a ecrit: >>> Mini-OS shouldn't use Xen internal paths for building. Import the >>> needed paths from Xen and fall back to the current values only if >>> the import was not possible. >>> >>> Signed-off-by: Juergen Gross <jgross@suse.com> >> >> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > Unfortunately this doesn't apply to staging. Since when does mini-os.git have a staging branch? > Juergen, can you rebase? To what? Juergen
On Tue, Jul 21, 2020 at 02:24:51PM +0200, Jürgen Groß wrote: > On 21.07.20 14:21, Wei Liu wrote: > > On Sat, Jul 18, 2020 at 08:18:27PM +0200, Samuel Thibault wrote: > > > Juergen Gross, le lun. 13 juil. 2020 10:42:30 +0200, a ecrit: > > > > Mini-OS shouldn't use Xen internal paths for building. Import the > > > > needed paths from Xen and fall back to the current values only if > > > > the import was not possible. > > > > > > > > Signed-off-by: Juergen Gross <jgross@suse.com> > > > > > > Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > > > Unfortunately this doesn't apply to staging. > > Since when does mini-os.git have a staging branch? > > > Juergen, can you rebase? > > To what? Urgh, my bad! I thought this was a patch for xen.git. :-p Wei. > > > Juergen
On Tue, Jul 21, 2020 at 12:39:40PM +0000, Wei Liu wrote: > On Tue, Jul 21, 2020 at 02:24:51PM +0200, Jürgen Groß wrote: > > On 21.07.20 14:21, Wei Liu wrote: > > > On Sat, Jul 18, 2020 at 08:18:27PM +0200, Samuel Thibault wrote: > > > > Juergen Gross, le lun. 13 juil. 2020 10:42:30 +0200, a ecrit: > > > > > Mini-OS shouldn't use Xen internal paths for building. Import the > > > > > needed paths from Xen and fall back to the current values only if > > > > > the import was not possible. > > > > > > > > > > Signed-off-by: Juergen Gross <jgross@suse.com> > > > > > > > > Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > > > > > Unfortunately this doesn't apply to staging. > > > > Since when does mini-os.git have a staging branch? > > > > > Juergen, can you rebase? > > > > To what? > > Urgh, my bad! I thought this was a patch for xen.git. :-p Applied to mini-os.git. Wei.
diff --git a/Config.mk b/Config.mk index f6a2afa..cb823c2 100644 --- a/Config.mk +++ b/Config.mk @@ -33,6 +33,19 @@ endif # ifneq ($(XEN_ROOT),) MINIOS_ROOT=$(XEN_ROOT)/extras/mini-os + +-include $(XEN_ROOT)/stubdom/mini-os.mk + +XENSTORE_CPPFLAGS ?= -isystem $(XEN_ROOT)/tools/xenstore/include +TOOLCORE_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore +TOOLLOG_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog +EVTCHN_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn +GNTTAB_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab +CALL_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call +FOREIGNMEMORY_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory +DEVICEMODEL_PATH ?= $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel +CTRL_PATH ?= $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) +GUEST_PATH ?= $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) else MINIOS_ROOT=$(TOPLEVEL_DIR) endif @@ -93,7 +106,7 @@ DEF_CPPFLAGS += -D__MINIOS__ ifeq ($(libc),y) DEF_CPPFLAGS += -DHAVE_LIBC DEF_CPPFLAGS += -isystem $(MINIOS_ROOT)/include/posix -DEF_CPPFLAGS += -isystem $(XEN_ROOT)/tools/xenstore/include +DEF_CPPFLAGS += $(XENSTORE_CPPFLAGS) endif ifneq ($(LWIPDIR),) diff --git a/Makefile b/Makefile index be640cd..4b76b55 100644 --- a/Makefile +++ b/Makefile @@ -125,23 +125,24 @@ OBJS := $(filter-out $(OBJ_DIR)/lwip%.o $(LWO), $(OBJS)) ifeq ($(libc),y) ifeq ($(CONFIG_XC),y) -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore -whole-archive -lxentoolcore -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore/libxentoolcore.a -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog -whole-archive -lxentoollog -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog/libxentoollog.a -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn -whole-archive -lxenevtchn -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn/libxenevtchn.a -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab -whole-archive -lxengnttab -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab/libxengnttab.a -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call -whole-archive -lxencall -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call/libxencall.a -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory -whole-archive -lxenforeignmemory -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory/libxenforeignmemory.a -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel -whole-archive -lxendevicemodel -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel/libxendevicemodel.a -APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) -whole-archive -lxenguest -lxenctrl -no-whole-archive -LIBS += $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)/libxenctrl.a -LIBS += $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)/libxenguest.a +APP_LDLIBS += -L$(TOOLCORE_PATH) -whole-archive -lxentoolcore -no-whole-archive +LIBS += $(TOOLCORE_PATH)/libxentoolcore.a +APP_LDLIBS += -L$(TOOLLOG_PATH) -whole-archive -lxentoollog -no-whole-archive +LIBS += $(TOOLLOG_PATH)/libxentoollog.a +APP_LDLIBS += -L$(EVTCHN_PATH) -whole-archive -lxenevtchn -no-whole-archive +LIBS += $(EVTCHN_PATH)/libxenevtchn.a +APP_LDLIBS += -L$(GNTTAB_PATH) -whole-archive -lxengnttab -no-whole-archive +LIBS += $(GNTTAB_PATH)/libxengnttab.a +APP_LDLIBS += -L$(CALL_PATH) -whole-archive -lxencall -no-whole-archive +LIBS += $(CALL_PATH)/libxencall.a +APP_LDLIBS += -L$(FOREIGNMEMORY_PATH) -whole-archive -lxenforeignmemory -no-whole-archive +LIBS += $(FOREIGNMEMORY_PATH)/libxenforeignmemory.a +APP_LDLIBS += -L$(DEVICEMODEL_PATH) -whole-archive -lxendevicemodel -no-whole-archive +LIBS += $(DEVICEMODEL_PATH)/libxendevicemodel.a +APP_LDLIBS += -L$(GUEST_PATH) -whole-archive -lxenguest -no-whole-archive +LIBS += $(GUEST_PATH)/libxenguest.a +APP_LDLIBS += -L$(CTRL_PATH) -whole-archive -lxenctrl -no-whole-archive +LIBS += $(CTRL_PATH)/libxenctrl.a endif APP_LDLIBS += -lpci APP_LDLIBS += -lz
Mini-OS shouldn't use Xen internal paths for building. Import the needed paths from Xen and fall back to the current values only if the import was not possible. Signed-off-by: Juergen Gross <jgross@suse.com> --- V2: correct typo (XCALL_APTH -> CALL_PATH) --- Config.mk | 15 ++++++++++++++- Makefile | 35 ++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 18 deletions(-)