diff mbox

[v3,06/17] xen/livepatch/x86/arm32: Force .livepatch.depends section to be uint32_t aligned.

Message ID 20170919003207.GA24480@x230.dumpdata.com (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk Sept. 19, 2017, 12:32 a.m. UTC
> > +.PHONY: livepatch_depends.h
> > +livepatch_depends.h: note.bin
> > +	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
> 
> It looks quite odd to use a file in firmware/hvmloader for livepatch. Would
> it be possible to move mkhex to a generic place?

Like so?

Comments

Julien Grall Sept. 19, 2017, 11:05 a.m. UTC | #1
Hi Konrad,

On 19/09/17 01:32, Konrad Rzeszutek Wilk wrote:
>>> +.PHONY: livepatch_depends.h
>>> +livepatch_depends.h: note.bin
>>> +	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
>>
>> It looks quite odd to use a file in firmware/hvmloader for livepatch. Would
>> it be possible to move mkhex to a generic place?
> 
> Like so?

It is what I had in mind. I CCed Ian and Wei to get feedback from them.

Cheers,


> 
> diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
> index 7c4c0ce535..a5b4c32c1a 100644
> --- a/tools/firmware/hvmloader/Makefile
> +++ b/tools/firmware/hvmloader/Makefile
> @@ -91,23 +91,23 @@ roms.inc: $(ROMS)
>   
>   ifneq ($(ROMBIOS_ROM),)
>   	echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new
> -	sh ./mkhex rombios $(ROMBIOS_ROM) >> $@.new
> +	sh ../../misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new
>   	echo "#endif" >> $@.new
>   endif
>   
>   ifneq ($(STDVGA_ROM),)
>   	echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
> -	sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
> +	sh ../../misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
>   	echo "#endif" >> $@.new
>   endif
>   ifneq ($(CIRRUSVGA_ROM),)
>   	echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
> -	sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
> +	sh ../../misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
>   	echo "#endif" >> $@.new
>   endif
>   ifneq ($(ETHERBOOT_ROMS),)
>   	echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
> -	sh ./mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
> +	sh ../../misc/mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
>   	echo "#endif" >> $@.new
>   endif
>   
> diff --git a/tools/firmware/hvmloader/mkhex b/tools/misc/mkhex
> similarity index 100%
> rename from tools/firmware/hvmloader/mkhex
> rename to tools/misc/mkhex
> diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile
> index 8ac9f5e426..f0365305ba 100644
> --- a/xen/test/livepatch/Makefile
> +++ b/xen/test/livepatch/Makefile
> @@ -73,7 +73,7 @@ note.bin:
>   
>   .PHONY: livepatch_depends.h
>   livepatch_depends.h: note.bin
> -	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
> +	$(shell (../../../tools/misc/mkhex $(NOTE_DEPENDS) $^ > $@))
>   
>   #
>   # Extract the build-id of the xen_hello_world.livepatch
> @@ -85,7 +85,7 @@ hello_world_note.bin: $(LIVEPATCH)
>   
>   .PHONY: hello_world_livepatch_depends.h
>   hello_world_livepatch_depends.h: hello_world_note.bin
> -	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
> +	$(shell (../../../tools/misc/mkhex $(NOTE_DEPENDS) $^ > $@))
>   
>   xen_bye_world.o: config.h hello_world_livepatch_depends.h
>   
>
Wei Liu Sept. 20, 2017, 2:01 p.m. UTC | #2
On Tue, Sep 19, 2017 at 12:05:16PM +0100, Julien Grall wrote:
> Hi Konrad,
> 
> On 19/09/17 01:32, Konrad Rzeszutek Wilk wrote:
> > > > +.PHONY: livepatch_depends.h
> > > > +livepatch_depends.h: note.bin
> > > > +	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
> > > 
> > > It looks quite odd to use a file in firmware/hvmloader for livepatch. Would
> > > it be possible to move mkhex to a generic place?
> > 
> > Like so?
> 
> It is what I had in mind. I CCed Ian and Wei to get feedback from them.
> 

Just move it to a directory called tools/scripts?
Konrad Rzeszutek Wilk Sept. 20, 2017, 9:17 p.m. UTC | #3
On Wed, Sep 20, 2017 at 03:01:57PM +0100, Wei Liu wrote:
> On Tue, Sep 19, 2017 at 12:05:16PM +0100, Julien Grall wrote:
> > Hi Konrad,
> > 
> > On 19/09/17 01:32, Konrad Rzeszutek Wilk wrote:
> > > > > +.PHONY: livepatch_depends.h
> > > > > +livepatch_depends.h: note.bin
> > > > > +	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
> > > > 
> > > > It looks quite odd to use a file in firmware/hvmloader for livepatch. Would
> > > > it be possible to move mkhex to a generic place?
> > > 
> > > Like so?
> > 
> > It is what I had in mind. I CCed Ian and Wei to get feedback from them.
> > 
> 
> Just move it to a directory called tools/scripts?

I spoke to Wei and Ian on IRC and they are OK with it being in tools/misc - especially
as 'mkrpm','mkdeb' are all in there.
diff mbox

Patch

diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
index 7c4c0ce535..a5b4c32c1a 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -91,23 +91,23 @@  roms.inc: $(ROMS)
 
 ifneq ($(ROMBIOS_ROM),)
 	echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new
-	sh ./mkhex rombios $(ROMBIOS_ROM) >> $@.new
+	sh ../../misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new
 	echo "#endif" >> $@.new
 endif
 
 ifneq ($(STDVGA_ROM),)
 	echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
-	sh ./mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
+	sh ../../misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new
 	echo "#endif" >> $@.new
 endif
 ifneq ($(CIRRUSVGA_ROM),)
 	echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new
-	sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
+	sh ../../misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
 	echo "#endif" >> $@.new
 endif
 ifneq ($(ETHERBOOT_ROMS),)
 	echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
-	sh ./mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
+	sh ../../misc/mkhex etherboot $(ETHERBOOT_ROMS) >> $@.new
 	echo "#endif" >> $@.new
 endif
 
diff --git a/tools/firmware/hvmloader/mkhex b/tools/misc/mkhex
similarity index 100%
rename from tools/firmware/hvmloader/mkhex
rename to tools/misc/mkhex
diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile
index 8ac9f5e426..f0365305ba 100644
--- a/xen/test/livepatch/Makefile
+++ b/xen/test/livepatch/Makefile
@@ -73,7 +73,7 @@  note.bin:
 
 .PHONY: livepatch_depends.h
 livepatch_depends.h: note.bin
-	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
+	$(shell (../../../tools/misc/mkhex $(NOTE_DEPENDS) $^ > $@))
 
 #
 # Extract the build-id of the xen_hello_world.livepatch
@@ -85,7 +85,7 @@  hello_world_note.bin: $(LIVEPATCH)
 
 .PHONY: hello_world_livepatch_depends.h
 hello_world_livepatch_depends.h: hello_world_note.bin
-	$(shell (../../../tools/firmware/hvmloader/mkhex $(NOTE_DEPENDS) $^ > $@))
+	$(shell (../../../tools/misc/mkhex $(NOTE_DEPENDS) $^ > $@))
 
 xen_bye_world.o: config.h hello_world_livepatch_depends.h