From patchwork Mon Dec 6 17:02:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12658993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 487F2C4332F for ; Mon, 6 Dec 2021 17:07:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.239449.415116 (Exim 4.92) (envelope-from ) id 1muHSI-0005of-1J; Mon, 06 Dec 2021 17:07:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 239449.415116; Mon, 06 Dec 2021 17:07:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muHSH-0005oW-TK; Mon, 06 Dec 2021 17:07:09 +0000 Received: by outflank-mailman (input) for mailman id 239449; Mon, 06 Dec 2021 17:07:09 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muHPL-0005ti-G6 for xen-devel@lists.xenproject.org; Mon, 06 Dec 2021 17:04:07 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8461dcdc-56b6-11ec-8a4d-196798b21f7b; Mon, 06 Dec 2021 18:04:06 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8461dcdc-56b6-11ec-8a4d-196798b21f7b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1638810246; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SYJTJIKxHEFQcMKNpvz4kHz4LT/E8ZyffBaU/35UM+o=; b=SZpZIlN/a17Ht6GaXvXX8/7SyBd3Pp2dTxLfhp7yRWDcgEMHZ9E4rZRi 7rTWRxC+oRNoPbUoDjMaJbXUz/Dd1Fw+EB2JyRBGsbAICc9S/ptJ609+o molDybIW1BCryY0UNuuxS50EkR4doQccRDH/wQyhfotnzr7biwB1Mfw+6 Y=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: VCdhQLflCCIZyRDomZsky6KSMXnle3oGtqd3o5o8N7VxYOorQ/qkUU4iNNAzQcdffkS21AIJlM gjy7VQ1ZNkfstePOqeQz9jCWEGCmsmIgPuQxysZk6bxRWtWiOC/eUdbHseV8hXQs6u+kM7oren PuEWLFXSw/BosuoSlvze/WY/Ghk4McC4ekghT9eaICt8yd2pKILl2RtEIr8+AJV6myEICKQOrl 7l+4ouN8vfjx09W+Ht9XEoR+i4Bjjf5XXCh9PH/Hrxs5ic4iTxyUC+YU2ioEU+Z6jsoEAbqPq3 AHXvs4FrJVgDM+kwDSDm51q8 X-SBRS: 5.1 X-MesageID: 59387870 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:otoXGKiBxFDXDfpOgfhSP/JAX161khcKZh0ujC45NGQN5FlHY01je htvXGDSOanZN2qme4xyYI+z8UpSvMLczYc3QQVsryA8E38b9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29Qw34Dja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWic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XgHletudELUOd0PKl70+Y1nJnWp3P86Ks0BMzvZwT6e2 1rECBsUv7CV8YQ07MPIleaPqILwS7lyGU9THm/667eqNHaFojr/kNEYCOvRJGLTTmL5/qmmd N559fCkPa1VhktOvqp9D61vkfA06ezwquII1Q9jBnjKMQimU+syPnmc0MBTnaRR3bsF6xCuU 0eC99QGa7WEPMTpTAwYKAY/N7nR0PgVnn/Z7OgvIVW87yhypeLVXUJXNhiKqSpcMLoqb991n bZ/4JYbu16llx4nEtealSQFpW2DI0sJX7gjqpxHUpTgjRAmyw0abJHRYsMsDEpjtzmY3pEWH wKp IronPort-HdrOrdr: A9a23:2jT6tqsanajhhILcCJNg4BUy7skDfNV00zEX/kB9WHVpmszxra +TdZMgpHrJYVcqKRYdcL+7WZVoLUmwyXcX2/hyAV7BZmnbUQKTRekIh7cKqweQfxEWndQy6U 4PScRD4aXLfDtHsfo= X-IronPort-AV: E=Sophos;i="5.87,292,1631592000"; d="scan'208";a="59387870" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Ian Jackson Subject: [XEN PATCH 26/57] tools/firmware/hvmloader: rework Makefile Date: Mon, 6 Dec 2021 17:02:09 +0000 Message-ID: <20211206170241.13165-27-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211206170241.13165-1-anthony.perard@citrix.com> References: <20211206170241.13165-1-anthony.perard@citrix.com> MIME-Version: 1.0 Setup proper dependencies with libacpi so we don't need to run "make hvmloader" in the "all" target. ("build.o" new prerequisite isn't exactly proper but a side effect of building the $(DSDT_FILES) is to generate the "ssdt_*.h" needed by "build.o".) Make use if "-iquote" instead of a plain "-I". For "roms.inc" target, use "$(SHELL)" instead of plain "sh". And use full path to "mkhex" instead of a relative one. Lastly, add "-f" flag to "mv", in case the target already exist. Signed-off-by: Anthony PERARD --- tools/firmware/hvmloader/Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index b754220839..fc20932110 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -60,8 +60,7 @@ ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) endif .PHONY: all -all: acpi - $(MAKE) hvmloader +all: hvmloader .PHONY: acpi acpi: @@ -73,12 +72,15 @@ smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\"" ACPI_PATH = ../../libacpi DSDT_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES)) build.o static_tables.o -$(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\" +$(ACPI_OBJS): CFLAGS += -iquote . -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\" CFLAGS += -I$(ACPI_PATH) vpath build.c $(ACPI_PATH) vpath static_tables.c $(ACPI_PATH) OBJS += $(ACPI_OBJS) +$(DSDT_FILES): acpi +build.o: $(DSDT_FILES) + hvmloader: $(OBJS) hvmloader.lds $(LD) $(LDFLAGS_DIRECT) -N -T hvmloader.lds -o $@ $(OBJS) @@ -87,21 +89,21 @@ roms.inc: $(ROMS) ifneq ($(ROMBIOS_ROM),) echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new - sh ../../misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new + $(SHELL) $(XEN_ROOT)/tools/misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new echo "#endif" >> $@.new endif ifneq ($(STDVGA_ROM),) echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new - sh ../../misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new + $(SHELL) $(XEN_ROOT)/tools/misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new echo "#endif" >> $@.new endif ifneq ($(CIRRUSVGA_ROM),) echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new - sh ../../misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new + $(SHELL) $(XEN_ROOT)/tools/misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new echo "#endif" >> $@.new endif - mv $@.new $@ + mv -f $@.new $@ .PHONY: clean clean: