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

Re: [PATCH v4 1/2] xen: asm-generic support



Hello Bertrand

On Mon, 2023-09-04 at 13:39 +0000, Bertrand Marquis wrote:
> > diff --git a/xen/scripts/Makefile.asm-generic
> > b/xen/scripts/Makefile.asm-generic
> > new file mode 100644
> > index 0000000000..0aac3f50b8
> > --- /dev/null
> > +++ b/xen/scripts/Makefile.asm-generic
> > @@ -0,0 +1,23 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +# include/asm-generic contains a lot of files that are used
> > +# verbatim by several architectures.
> > +#
> > +# This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild
> > +# and for each file listed in this file with generic-y creates
> > +# a small wrapper file in $(obj)
> > (arch/$(SRCARCH)/include/generated/asm)
> > +
> > +kbuild-file := $(srctree)/arch/$(SRCARCH)/include/asm/Kbuild
> > +include $(kbuild-file)
> > +
> > +include scripts/Kbuild.include
> > +
> > +# Create output directory if not already present
> > +_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
> > +
> > +quiet_cmd_wrap = WRAP    $@
> > +cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@
> > +
> > +all: $(patsubst %, $(obj)/%, $(generic-y))
> > +
> > +$(obj)/%.h:
> > + $(call cmd,wrap)
> 
> In fact i think your files are not generated in the srctree so this
> will break if you use out of tree compilation.
I checked that and in both cases it generated in correct place.

First case:
$ CONTAINER_NO_PULL=1 CONTAINER=riscv64
./automation/scripts/containerize make XEN_TARGET_ARCH=riscv64 -C xen
build

$ ls -la xen/arch/riscv/include/generated/asm/vm_event.h 
-rw-r--r--. 1 ok ok 34 вер  6 14:32
xen/arch/riscv/include/generated/asm/vm_event.h

Second case: ( out-of-tree )
$ CONTAINER_NO_PULL=1 CONTAINER=riscv64
./automation/scripts/containerize make O=xen_build
XEN_TARGET_ARCH=riscv64 -C xen build V=1

$ ls -la xen/xen_build/arch/riscv/include/generated/asm/vm_event.h 
-rw-r--r--. 1 ok ok 34 вер  6 14:34
xen/xen_build/arch/riscv/include/generated/asm/vm_event.h

Could you please clarify if there's somithing I might have overlooked?

~ Oleksii





 


Rackspace

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