Ian Campbell
2013-Jul-17 15:37 UTC
[PATCH 0/3] xen: various changes to what we install in /boot
Jan suggested a couple of cleanups based upon my "xen: allow architecture to choose whether to compress installed xen binary" patch. So this series now consists of: xen: allow architecture to choose how/whether to compress installed xen binary xen: x86: drop the ".gz" suffix when installing xen: Use $(T) and $(D) aliases in install target This is based on my "xen: arm: make zImage the default target which we install" patch but I don''t think there is any actual interaction. Ian.
Ian Campbell
2013-Jul-17 15:37 UTC
[PATCH 1/3] xen: allow architecture to choose how/whether to compress installed xen binary
This is a follow up to "xen: arm: make zImage the default target which we install". On ARM the xen.gz binary installed into /boot is not immediately useful because bootloaders (e.g. u-boot) do not unconditionally support decompression (except via the uImage wrapper, which we currently do not support via our build system) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- v3: Restrict $(Z) to just the rules which use it v2: Allowarch to specify the compression suffix to use --- config/arm32.mk | 2 ++ config/arm64.mk | 2 ++ config/x86_64.mk | 2 ++ xen/Makefile | 23 +++++++++++++---------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/config/arm32.mk b/config/arm32.mk index d8e958b..3bc642d 100644 --- a/config/arm32.mk +++ b/config/arm32.mk @@ -2,6 +2,8 @@ CONFIG_ARM := y CONFIG_ARM_32 := y CONFIG_ARM_$(XEN_OS) := y +CONFIG_XEN_INSTALL_SUFFIX :+ # -march= -mcpu # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: diff --git a/config/arm64.mk b/config/arm64.mk index b2457eb..1130630 100644 --- a/config/arm64.mk +++ b/config/arm64.mk @@ -2,6 +2,8 @@ CONFIG_ARM := y CONFIG_ARM_64 := y CONFIG_ARM_$(XEN_OS) := y +CONFIG_XEN_INSTALL_SUFFIX :+ CFLAGS += #-marm -march= -mcpu= etc HAS_PL011 := y diff --git a/config/x86_64.mk b/config/x86_64.mk index 4ec6cc1..70c0d8d 100644 --- a/config/x86_64.mk +++ b/config/x86_64.mk @@ -8,6 +8,8 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y CONFIG_IOEMU ?= y +CONFIG_XEN_INSTALL_SUFFIX := .gz + CFLAGS += -m64 SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64) diff --git a/xen/Makefile b/xen/Makefile index 854a370..8bc8f3a 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -29,15 +29,17 @@ else endif .PHONY: _build -_build: $(TARGET).gz +_build: Z=$(CONFIG_XEN_INSTALL_SUFFIX) +_build: $(TARGET)$(Z) .PHONY: _install -_install: $(TARGET).gz +_install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) +_install: $(TARGET)$(Z) [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot - $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz + $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION)$(Z) + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))$(Z) $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION) if [ -r $(TARGET).efi -a -n ''$(EFI_DIR)'' ]; then \ [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ @@ -53,13 +55,14 @@ _install: $(TARGET).gz fi .PHONY: _uninstall +_uninstall: Z=$(CONFIG_XEN_INSTALL_SUFFIX) _uninstall: D=$(DESTDIR) _uninstall: T=$(notdir $(TARGET)) _uninstall: - rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION).gz - rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).gz - rm -f $(D)/boot/$(T)-$(XEN_VERSION).gz - rm -f $(D)/boot/$(T).gz + rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z) + rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) + rm -f $(D)/boot/$(T)-$(XEN_VERSION)$(Z) + rm -f $(D)/boot/$(T)$(Z) rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi -- 1.7.2.5
Ian Campbell
2013-Jul-17 15:37 UTC
[PATCH 2/3] xen: x86: drop the ".gz" suffix when installing
As Jan says it is pretty meaningless under /boot anyway. However I am slightly concerned about breaking bootloaders (or more specifically their help scripts which automatically generate config files). By inspection at leastr grub 2''s update-grub script (as present in Debian Wheezy) seems to cope (it matches on xen* not xen*.gz) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: jbeulich@suse.com Cc: keir@xen.org --- xen/Makefile | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 8bc8f3a..0a20662 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -36,10 +36,10 @@ _build: $(TARGET)$(Z) _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) _install: $(TARGET)$(Z) [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot - $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION)$(Z) - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))$(Z) + $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION) + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION) + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION) + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET)) $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION) if [ -r $(TARGET).efi -a -n ''$(EFI_DIR)'' ]; then \ [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ @@ -59,10 +59,10 @@ _uninstall: Z=$(CONFIG_XEN_INSTALL_SUFFIX) _uninstall: D=$(DESTDIR) _uninstall: T=$(notdir $(TARGET)) _uninstall: - rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z) - rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) - rm -f $(D)/boot/$(T)-$(XEN_VERSION)$(Z) - rm -f $(D)/boot/$(T)$(Z) + rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION) + rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION) + rm -f $(D)/boot/$(T)-$(XEN_VERSION) + rm -f $(D)/boot/$(T) rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi -- 1.7.2.5
Ian Campbell
2013-Jul-17 15:37 UTC
[PATCH 3/3] xen: Use $(T) and $(D) aliases in install target
This is consistent with the uninstall target and also shortens some longish lines. $(Z) be used in the depencies when it is declared in this way, so expand it. Suggested-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- xen/Makefile | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 0a20662..2bb5851 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -30,26 +30,28 @@ endif .PHONY: _build _build: Z=$(CONFIG_XEN_INSTALL_SUFFIX) -_build: $(TARGET)$(Z) +_build: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) .PHONY: _install _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) -_install: $(TARGET)$(Z) - [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot - $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION) - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION) - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION) - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET)) - $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION) +_install: D=$(DESTDIR) +_install: T=$(notdir $(TARGET)) +_install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) + [ -d $(D)/boot ] || $(INSTALL_DIR) $(D)/boot + $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_FULLVERSION) + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION) + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)-$(XEN_VERSION) + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T) + $(INSTALL_DATA) $(TARGET)-syms $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) if [ -r $(TARGET).efi -a -n ''$(EFI_DIR)'' ]; then \ - [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ - $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \ - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \ - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \ - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \ + [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \ + $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \ + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \ + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \ + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \ if [ -n ''$(EFI_MOUNTPOINT)'' -a -n ''$(EFI_VENDOR)'' ]; then \ - $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \ - elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(DESTDIR))" ]; then \ + $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \ + elif [ "$(D)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(D))" ]; then \ echo ''EFI installation only partially done (EFI_VENDOR not set)'' >&2; \ fi; \ fi -- 1.7.2.5
Keir Fraser
2013-Jul-17 16:32 UTC
Re: [PATCH 1/3] xen: allow architecture to choose how/whether to compress installed xen binary
On 17/07/2013 16:37, "Ian Campbell" <ian.campbell@citrix.com> wrote:> This is a follow up to "xen: arm: make zImage the default target which we > install". > > On ARM the xen.gz binary installed into /boot is not immediately useful > because > bootloaders (e.g. u-boot) do not unconditionally support decompression (except > via the uImage wrapper, which we currently do not support via our build > system) > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Acked-by: Keir Fraser <keir@xen.org>
Keir Fraser
2013-Jul-17 16:33 UTC
Re: [PATCH 2/3] xen: x86: drop the ".gz" suffix when installing
On 17/07/2013 16:37, "Ian Campbell" <ian.campbell@citrix.com> wrote:> As Jan says it is pretty meaningless under /boot anyway. However I am slightly > concerned about breaking bootloaders (or more specifically their help scripts > which automatically generate config files). By inspection at leastr grub 2''s > update-grub script (as present in Debian Wheezy) seems to cope (it matches on > xen* not xen*.gz) > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Cc: jbeulich@suse.com > Cc: keir@xen.orgAcked-by: Keir Fraser <keir@xen.org>
Keir Fraser
2013-Jul-17 16:33 UTC
Re: [PATCH 3/3] xen: Use $(T) and $(D) aliases in install target
On 17/07/2013 16:37, "Ian Campbell" <ian.campbell@citrix.com> wrote:> This is consistent with the uninstall target and also shortens some longish > lines. > > $(Z) be used in the depencies when it is declared in this way, so expand it. > > Suggested-by: Jan Beulich <jbeulich@suse.com> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > ---Acked-by: Keir Fraser <keir@xen.org>
Julien Grall
2013-Jul-17 16:44 UTC
Re: [PATCH 1/3] xen: allow architecture to choose how/whether to compress installed xen binary
On 07/17/2013 04:37 PM, Ian Campbell wrote:> This is a follow up to "xen: arm: make zImage the default target which we > install". > > On ARM the xen.gz binary installed into /boot is not immediately useful because > bootloaders (e.g. u-boot) do not unconditionally support decompression (except > via the uImage wrapper, which we currently do not support via our build system) > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Acked-by: Julien Grall <julien.grall@linaro.org>> --- > v3: Restrict $(Z) to just the rules which use it > v2: Allowarch to specify the compression suffix to use > --- > config/arm32.mk | 2 ++ > config/arm64.mk | 2 ++ > config/x86_64.mk | 2 ++ > xen/Makefile | 23 +++++++++++++---------- > 4 files changed, 19 insertions(+), 10 deletions(-) > > diff --git a/config/arm32.mk b/config/arm32.mk > index d8e958b..3bc642d 100644 > --- a/config/arm32.mk > +++ b/config/arm32.mk > @@ -2,6 +2,8 @@ CONFIG_ARM := y > CONFIG_ARM_32 := y > CONFIG_ARM_$(XEN_OS) := y > > +CONFIG_XEN_INSTALL_SUFFIX :> + > # -march= -mcpu> > # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: > diff --git a/config/arm64.mk b/config/arm64.mk > index b2457eb..1130630 100644 > --- a/config/arm64.mk > +++ b/config/arm64.mk > @@ -2,6 +2,8 @@ CONFIG_ARM := y > CONFIG_ARM_64 := y > CONFIG_ARM_$(XEN_OS) := y > > +CONFIG_XEN_INSTALL_SUFFIX :> + > CFLAGS += #-marm -march= -mcpu= etc > > HAS_PL011 := y > diff --git a/config/x86_64.mk b/config/x86_64.mk > index 4ec6cc1..70c0d8d 100644 > --- a/config/x86_64.mk > +++ b/config/x86_64.mk > @@ -8,6 +8,8 @@ CONFIG_MIGRATE := y > CONFIG_XCUTILS := y > CONFIG_IOEMU ?= y > > +CONFIG_XEN_INSTALL_SUFFIX := .gz > + > CFLAGS += -m64 > > SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64) > diff --git a/xen/Makefile b/xen/Makefile > index 854a370..8bc8f3a 100644 > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -29,15 +29,17 @@ else > endif > > .PHONY: _build > -_build: $(TARGET).gz > +_build: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > +_build: $(TARGET)$(Z) > > .PHONY: _install > -_install: $(TARGET).gz > +_install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > +_install: $(TARGET)$(Z) > [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot > - $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz > + $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) > + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) > + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION)$(Z) > + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))$(Z) > $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION) > if [ -r $(TARGET).efi -a -n ''$(EFI_DIR)'' ]; then \ > [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ > @@ -53,13 +55,14 @@ _install: $(TARGET).gz > fi > > .PHONY: _uninstall > +_uninstall: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > _uninstall: D=$(DESTDIR) > _uninstall: T=$(notdir $(TARGET)) > _uninstall: > - rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION).gz > - rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).gz > - rm -f $(D)/boot/$(T)-$(XEN_VERSION).gz > - rm -f $(D)/boot/$(T).gz > + rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z) > + rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) > + rm -f $(D)/boot/$(T)-$(XEN_VERSION)$(Z) > + rm -f $(D)/boot/$(T)$(Z) > rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) > rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi > rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi >
Julien Grall
2013-Jul-17 16:53 UTC
Re: [PATCH 2/3] xen: x86: drop the ".gz" suffix when installing
On 07/17/2013 04:37 PM, Ian Campbell wrote:> As Jan says it is pretty meaningless under /boot anyway. However I am slightly > concerned about breaking bootloaders (or more specifically their help scripts > which automatically generate config files). By inspection at leastr grub 2''s^^ minor typo here> update-grub script (as present in Debian Wheezy) seems to cope (it matches on > xen* not xen*.gz) > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Acked-by: Julien Grall <julien.grall@linaro.org>> Cc: jbeulich@suse.com > Cc: keir@xen.org > --- > xen/Makefile | 16 ++++++++-------- > 1 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/xen/Makefile b/xen/Makefile > index 8bc8f3a..0a20662 100644 > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -36,10 +36,10 @@ _build: $(TARGET)$(Z) > _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > _install: $(TARGET)$(Z) > [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot > - $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION)$(Z) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))$(Z) > + $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION) > + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION) > + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION) > + ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET)) > $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION) > if [ -r $(TARGET).efi -a -n ''$(EFI_DIR)'' ]; then \ > [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ > @@ -59,10 +59,10 @@ _uninstall: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > _uninstall: D=$(DESTDIR) > _uninstall: T=$(notdir $(TARGET)) > _uninstall: > - rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z) > - rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) > - rm -f $(D)/boot/$(T)-$(XEN_VERSION)$(Z) > - rm -f $(D)/boot/$(T)$(Z) > + rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION) > + rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION) > + rm -f $(D)/boot/$(T)-$(XEN_VERSION) > + rm -f $(D)/boot/$(T) > rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) > rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi > rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi >
Julien Grall
2013-Jul-17 16:54 UTC
Re: [PATCH 3/3] xen: Use $(T) and $(D) aliases in install target
On 07/17/2013 04:37 PM, Ian Campbell wrote:> This is consistent with the uninstall target and also shortens some longish > lines. > > $(Z) be used in the depencies when it is declared in this way, so expand it. > > Suggested-by: Jan Beulich <jbeulich@suse.com> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Acked-by: Julien Grall <julien.grall@linaro.org>> --- > xen/Makefile | 32 +++++++++++++++++--------------- > 1 files changed, 17 insertions(+), 15 deletions(-) > > diff --git a/xen/Makefile b/xen/Makefile > index 0a20662..2bb5851 100644 > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -30,26 +30,28 @@ endif > > .PHONY: _build > _build: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > -_build: $(TARGET)$(Z) > +_build: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) > > .PHONY: _install > _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > -_install: $(TARGET)$(Z) > - [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot > - $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir $(TARGET)) > - $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION) > +_install: D=$(DESTDIR) > +_install: T=$(notdir $(TARGET)) > +_install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) > + [ -d $(D)/boot ] || $(INSTALL_DIR) $(D)/boot > + $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_FULLVERSION) > + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION) > + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)-$(XEN_VERSION) > + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T) > + $(INSTALL_DATA) $(TARGET)-syms $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) > if [ -r $(TARGET).efi -a -n ''$(EFI_DIR)'' ]; then \ > - [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ > - $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \ > - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \ > - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \ > - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \ > + [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \ > + $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \ > + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \ > + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \ > + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \ > if [ -n ''$(EFI_MOUNTPOINT)'' -a -n ''$(EFI_VENDOR)'' ]; then \ > - $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir $(TARGET))-$(XEN_FULLVERSION).efi; \ > - elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(DESTDIR))" ]; then \ > + $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \ > + elif [ "$(D)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(D))" ]; then \ > echo ''EFI installation only partially done (EFI_VENDOR not set)'' >&2; \ > fi; \ > fi >
Jan Beulich
2013-Jul-18 07:26 UTC
Re: [PATCH 3/3] xen: Use $(T) and $(D) aliases in install target
>>> On 17.07.13 at 17:37, Ian Campbell <ian.campbell@citrix.com> wrote: > This is consistent with the uninstall target and also shortens some longish > lines. > > $(Z) be used in the depencies when it is declared in this way, so expand it.I was about to ask the very question of whether this works in response to the first patch, but luckily went through the others first. If this doesn''t work, then the first patch shouldn''t introduce it, and then this one doesn''t need to fix it (and you can drop the line above, which appears to be lacking a "can''t" anyway). And I suppose you don''t need to define Z then at all for _build? Jan> Suggested-by: Jan Beulich <jbeulich@suse.com> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > --- > xen/Makefile | 32 +++++++++++++++++--------------- > 1 files changed, 17 insertions(+), 15 deletions(-) > > diff --git a/xen/Makefile b/xen/Makefile > index 0a20662..2bb5851 100644 > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -30,26 +30,28 @@ endif > > .PHONY: _build > _build: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > -_build: $(TARGET)$(Z) > +_build: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) > > .PHONY: _install > _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > -_install: $(TARGET)$(Z) > - [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot > - $(INSTALL_DATA) $(TARGET)$(Z) $(DESTDIR)/boot/$(notdir > $(TARGET))-$(XEN_FULLVERSION) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir > $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir > $(TARGET))-$(XEN_VERSION) > - ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION) $(DESTDIR)/boot/$(notdir > $(TARGET)) > - $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir > $(TARGET))-syms-$(XEN_FULLVERSION) > +_install: D=$(DESTDIR) > +_install: T=$(notdir $(TARGET)) > +_install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) > + [ -d $(D)/boot ] || $(INSTALL_DIR) $(D)/boot > + $(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_FULLVERSION) > + ln -f -s $(T)-$(XEN_FULLVERSION) > $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION) > + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T)-$(XEN_VERSION) > + ln -f -s $(T)-$(XEN_FULLVERSION) $(D)/boot/$(T) > + $(INSTALL_DATA) $(TARGET)-syms $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) > if [ -r $(TARGET).efi -a -n ''$(EFI_DIR)'' ]; then \ > - [ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \ > - $(INSTALL_DATA) $(TARGET).efi $(DESTDIR)$(EFI_DIR)/$(notdir > $(TARGET))-$(XEN_FULLVERSION).efi; \ > - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi > $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).efi; > \ > - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi > $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET))-$(XEN_VERSION).efi; \ > - ln -sf $(notdir $(TARGET))-$(XEN_FULLVERSION).efi > $(DESTDIR)$(EFI_DIR)/$(notdir $(TARGET)).efi; \ > + [ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \ > + $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \ > + ln -sf $(T)-$(XEN_FULLVERSION).efi > $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi; \ > + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \ > + ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \ > if [ -n ''$(EFI_MOUNTPOINT)'' -a -n ''$(EFI_VENDOR)'' ]; then \ > - $(INSTALL_DATA) $(TARGET).efi > $(DESTDIR)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(notdir > $(TARGET))-$(XEN_FULLVERSION).efi; \ > - elif [ "$(DESTDIR)" = "$(patsubst $(shell cd $(XEN_ROOT) && > pwd)/%,%,$(DESTDIR))" ]; then \ > + $(INSTALL_DATA) $(TARGET).efi > $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \ > + elif [ "$(D)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(D))" ]; then > \ > echo ''EFI installation only partially done (EFI_VENDOR not set)'' >&2; \ > fi; \ > fi > -- > 1.7.2.5
Jan Beulich
2013-Jul-18 07:34 UTC
Re: [PATCH 1/3] xen: allow architecture to choose how/whether to compress installed xen binary
>>> On 17.07.13 at 17:37, Ian Campbell <ian.campbell@citrix.com> wrote: > @@ -53,13 +55,14 @@ _install: $(TARGET).gz > fi > > .PHONY: _uninstall > +_uninstall: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > _uninstall: D=$(DESTDIR) > _uninstall: T=$(notdir $(TARGET))As you will likely want to rev this series once more anyway after my comment on patch 3, would you mind doing the above in (at the same time, as it turns out) logical (path, name, extension) and alphabetical order? Jan> _uninstall: > - rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION).gz > - rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).gz > - rm -f $(D)/boot/$(T)-$(XEN_VERSION).gz > - rm -f $(D)/boot/$(T).gz > + rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z) > + rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) > + rm -f $(D)/boot/$(T)-$(XEN_VERSION)$(Z) > + rm -f $(D)/boot/$(T)$(Z) > rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION) > rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi > rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi > -- > 1.7.2.5
Ian Campbell
2013-Jul-18 07:54 UTC
Re: [PATCH 1/3] xen: allow architecture to choose how/whether to compress installed xen binary
On Thu, 2013-07-18 at 08:34 +0100, Jan Beulich wrote:> >>> On 17.07.13 at 17:37, Ian Campbell <ian.campbell@citrix.com> wrote: > > @@ -53,13 +55,14 @@ _install: $(TARGET).gz > > fi > > > > .PHONY: _uninstall > > +_uninstall: Z=$(CONFIG_XEN_INSTALL_SUFFIX) > > _uninstall: D=$(DESTDIR) > > _uninstall: T=$(notdir $(TARGET)) > > As you will likely want to rev this series once more anyway after my > comment on patch 3, would you mind doing the above in (at the > same time, as it turns out) logical (path, name, extension) and > alphabetical order?Will do.
Ian Campbell
2013-Jul-18 07:54 UTC
Re: [PATCH 3/3] xen: Use $(T) and $(D) aliases in install target
On Thu, 2013-07-18 at 08:26 +0100, Jan Beulich wrote:> >>> On 17.07.13 at 17:37, Ian Campbell <ian.campbell@citrix.com> wrote: > > This is consistent with the uninstall target and also shortens some longish > > lines. > > > > $(Z) be used in the depencies when it is declared in this way, so expand it. > > I was about to ask the very question of whether this works in > response to the first patch, but luckily went through the others > first. If this doesn''t work, then the first patch shouldn''t introduce > it, and then this one doesn''t need to fix it (and you can drop the > line above, which appears to be lacking a "can''t" anyway). And I > suppose you don''t need to define Z then at all for _build?Yes, good points. Ian.
Possibly Parallel Threads
- [PATCH] xen: arm: make zImage the default target which we install
- [PATCH] x86/EFI: define and use EFI_DIR make variable, defaulting to /usr/lib64/efi
- make uninstall can delete xen-kernels
- [PATCH] x86/EFI: adjust installation logic
- r26 - in trunk/debian: . patches