From a680c0861cf6f9dc6a8a821e9e58ae43c5e68435 Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Thu, 22 Dec 2022 15:06:53 +0100 Subject: [PATCH] virtme-prep-kdir-mods: support kernel 6.2 Since the kernel commit f65a486821cf ("kbuild: change module.order to list *.o instead of *.ko") that is now in Linus tree in preparation of the future v6.2, module.order file lists .o files instead of .ko ones. virtme-prep-kdir-mods reads module.order file but it needs to create symlinks for the .ko files, not the .o ones. Signed-off-by: Matthieu Baerts --- bin/virtme-prep-kdir-mods | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/virtme-prep-kdir-mods b/bin/virtme-prep-kdir-mods index dd80ad5..142a493 100755 --- a/bin/virtme-prep-kdir-mods +++ b/bin/virtme-prep-kdir-mods @@ -24,11 +24,12 @@ ln -srfT . "$MODDIR/build" # Remove all preexisting symlinks and add symlinks to all modules that belong # to the build kenrnel. find "$MODDIR/kernel" -type l -print0 |xargs -0 rm -f -- -while read -r i; do +# from v6.2, modules.order lists .o files, we need the .ko ones +sed 's:\.o$:.ko:' modules.order | while read -r i; do [ ! -e "$i" ] && i=$(echo "$i" | sed s:^kernel/::) mkdir -p "$MODDIR/kernel/$(dirname "$i")" ln -sr "$i" "$MODDIR/kernel/$i" -done < modules.order +done # Link in the files that make modules_install would copy