[Top][All Lists]

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

Re: [Qemu-devel] update-linux-headers.sh fails on clean kernel dir

From: Sam Bobroff
Subject: Re: [Qemu-devel] update-linux-headers.sh fails on clean kernel dir
Date: Wed, 25 Jan 2017 11:25:51 +1100
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Jan 24, 2017 at 10:32:36AM +0000, Marc-André Lureau wrote:
> Hi
> On Tue, Jan 24, 2017 at 8:41 AM Sam Bobroff <address@hidden> wrote:
> > Hi QEMU developers,
> >
> > If I run scripts/update-linux-headers.sh from a clean checkout of QEMU
> > and point it at a clean checkout of a recent linux kernel (4.10-rc1 or
> > later), it fails:
> >
> > $ scripts/update-linux-headers.sh ~/tmp/linux/
> >
> > ...
> >
> > scripts/Makefile.headersinst:62: *** Missing generated UAPI file
> > ./arch/arm/include/generated/uapi/asm/unistd-common.h.  Stop.
> >
> > This seems to be because the script passes the arch to the kernel
> > makefile using "SRCARCH" rather than "ARCH".
> >
> > (SRCARCH seems to be intended as an internal value, and setting it does
> > not propagate the setting to ARCH. Because ARCH is left empty, the
> > prerequisites that should generate unistd-common.h fail. If ARCH is set,
> > SRCARCH is set automatically and everything works.)
> >
> > Changing the script to use "ARCH" seems to fixe the problem.
> >
> That's also what Documentation/kbuild/headers_install.txt documents.
> > (Note: when testing this be careful: unistd-common.h is not removed by
> > "make clean" in the kernel directory.)
> >
> > Does this seem correct?
> >
> > Should I send a patch even though it's a very small change?
> >
> >
> I think so, thanks

Thanks for the quick answer, I'll post a patch ASAP.

Perhaps you wouldn't mind commenting on this followup issue, since that
fix isn't enough to get the script working nicely...

With that fixed, update-linux-headers.sh still doesn't work as I would
expect. It seems that since commit
QEMU makes use of virtio_mmio.h but that file isn't installed by the
kernel's "install_headers" target so running update-linux-headers.sh
causes virtio_mmio.h to be deleted from the QEMU source rather than

(It looks like virtio_mmio.h was manually added by commit
5878b13642ddf8da44186ef93ac91319ff53668b )

It looks like the reason virtio_mmio.h isn't installed is that it's not
a uapi header and the reason this causes the deletion is that the file
has been placed in include/standard-headers/...

So, it seems there are several possible approaches:
(1) Move QEMU's copy of the file out of standard-headers.
(2) Ask the kernel to make virtio_mmio.h a uapi header.
(3) Change update-linux-headers.sh to manually copy that file.
(4) Manually copy that file in after running the script.

(1) seems to be the easiest to me, and (2) possibly the cleanest, but
what would you recommend? Should I try posting a patch for this too?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]