[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v3 04/25] tools/firmware/hvmloader: rework Makefile


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Mon, 11 Jul 2022 14:38:21 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 11 Jul 2022 13:39:03 +0000
  • Ironport-data: A9a23:10OJiqkIOxP97FCaXGm2Rsvo5gzoJkRdPkR7XQ2eYbSJt1+Wr1Gzt xIcWmvQb62MY2r8Ltoja4Tjpk8BupPUnNZhTlQ4qC8zQSMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EgLd9IR2NYy24DmWlrV4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYVD8UG/fip9UhShxyLAhGY4xG+7L+GC3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3s3d8zTbfHLA+TIrKWani7t5ExjYgwMtJGJ4yY uJGOWI/NkSRO3WjPH8XC619wfW1r0DZMBQEqFCNrpE2/zPMmVkZPL/Fb4OOJ43iqd9utkSSq 3/C/m/5KgoHL9HZwj2AmlqzgsffkCW9X5gdfJWc6/VjxnOawGceDBkLfVKhpL+yjUvWc8JSL QkY9zQjqYA29Ve3VZ/tUhugunmGsxUAHd1KHIUHBBqlk/SOpVzDXy5dE2AHOIdOWNIKqSICy 2e0uonHOg1Tqbi/dlulqJaUrj6LAH1ARYMdXhPoXTfp8vG6/txs1UqVE486eEKmpoarQG+tm lhmuAB73uxO1pBTis1X6Hid21qRSo71ohnZD+k9dkas9UtHaYGsfOREAnCLvK8bfO51orRs1 UXoevRyD8hUVPlhbATXHI0w8EiBvp5pygH0j191BIUG/D+w4XOldo04yGggeRg1bZZdJmO4O hO7VeZtCHh7ZSHCUEOKS9jpV5RCIVbIT7wJqcw4nvIRO8MsJWdrDQllZFKK3nCFrXXAZZoXY M/BGe71VC5yIf0+kFKeGrZGuZd2l39W+I8mbc2ip/hR+eHGNCD9pHZsGAbmU93VG4ve8V+Kq IcPbZHQo/idOcWnChTqHUcoBQhiBRAG6Vre8qS7qsbrztJaJVwc
  • Ironport-hdrordr: A9a23:cTEk8qP9Ua50g8BcTsejsMiBIKoaSvp037Eqv3oedfVwSL39qy nIpoV96faUskd1ZJhOo7290cW7LU80sKQFh7X5Xo3SPjUO2lHJEGgK1+KLqFfd8m/Fh41gPM 9bAtFD4bbLbGSS4/yU3DWF
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Jul 08, 2022 at 03:39:00PM +0000, Luca Fancellu wrote:
> > On 24 Jun 2022, at 17:04, Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote:
[...]
> > 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 <anthony.perard@xxxxxxxxxx>
> > ---
> > 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
> > @@ -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 $@
> 
> Here, instead of -f, is it safer -u? What’s your opinion on that? The patch 
> looks good to me.

make want to rebuild the target, so there is no reason to keep the
existing target. We do need to overwrite the existing target if it
exist.

Thanks for the reviews!

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.