virtme-run --mods=auto is not working with kernels >=6.2#82
virtme-run --mods=auto is not working with kernels >=6.2#82matttbe wants to merge 1 commit intoamluto:masterfrom
virtme-run --mods=auto is not working with kernels >=6.2#82Conversation
|
@matttbe thanks for this patch - I was having the same problem today so just tested your patch and it worked perfectly. Not sure if this is best practice, but I had to manually delete the .virtme_mods folder in my main linux directory to force the modules to show up. |
|
@dbrouwer3563 thank you for having validated this patch!
I don't remember I had to do that but when trying to understand the issue, I might have deleted the folder when it was filled in with |
bin/virtme-prep-kdir-mods
Outdated
| # from v6.2, modules.order lists .o files, we need the .ko ones | ||
| i=$(echo "$i" | sed 's:\.o$:.ko:') |
There was a problem hiding this comment.
Instead of fork/exec-ing a new sed process for every line, this could be done more efficiently by streaming the whole modules.order through a single process instead, e.g.:
sed 's:\.o$:.ko:' modules.order | while read -r i; do
# existing loop body
doneOr alternately, the string substitution could be achieved via parameter expansion instead of sed, e.g.:
if [ "${i%.o}" != "$i" ]; then
i="${i%.o}.ko"
fiThere was a problem hiding this comment.
I initially wanted to do the conversion with ${i/%.o/.ko} but sh is used here. I then added the sed there to imitate what is done the line below, more to have something simple.
I agree it is not optimal, I didn't think it would have been more important to have it more efficient. I can change of course, thank you for the suggestion.
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 <matthieu.baerts@tessares.net>
d384fd2 to
a680c08
Compare
|
@amluto can you please take a look at this PR? Thanks! |
tyhicks
left a comment
There was a problem hiding this comment.
These changes look good to me. I've also tested them and can verify that they work after blowing away any existing .virtme_mods directories that were created after kernel commit f65a486821cf.
|
This has been merged/fixed in https://github.com/arighi/virtme NOTE: we are trying to catch up with all the pending PR in this temporary fork. In the future we may merge everything back here if this project become active again, but for now please consider to follow also the development of arighi/virtme. |
virtme-prep-kdir-mods: support kernel 6.2Thank you for having created and maintained this very handy tool!
Since the kernel commit torvalds/linux@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.orderfile lists.ofiles instead of.koones.virtme-prep-kdir-modsreadsmodule.orderfile but it needs to create symlinks for the.kofiles, not the.oones.