2
0
Эх сурвалжийг харах

update-linux-headers.sh: Handle new kernel uapi/ directories

Recent kernels have moved to keeping the userspace headers
in uapi/ subdirectories. This breaks the detection of whether an
architecture has KVM support in the kernel because kvm.h has
moved in the kernel source tree. Update the check to support
both the old and new locations.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Peter Maydell 13 жил өмнө
parent
commit
b55f546eef

+ 2 - 1
scripts/update-linux-headers.sh

@@ -34,7 +34,8 @@ ARCHLIST=$(cd "$linux/arch" && echo *)
 
 
 for arch in $ARCHLIST; do
 for arch in $ARCHLIST; do
     # Discard anything which isn't a KVM-supporting architecture
     # Discard anything which isn't a KVM-supporting architecture
-    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then
+    if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ] &&
+        ! [ -e "$linux/arch/$arch/include/uapi/asm/kvm.h" ] ; then
         continue
         continue
     fi
     fi