Score:0

Compile the Linux kernel and select the corresponding version

ng flag

I want to write Linux character drivers on Ubuntu and load it, so I need to download the Linux kernel source code corresponding to Ubuntu and compile it。After uname -r is executed, the result is 5.11.0-41-generic,but I can't find the 5.11.0-41 version in the kernel website as https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/. I tired to download linx-5.11 and compile it ,but when I insmod module,it tell me invalid module format.and dmesg says disagrees about version of symbol module_layout. what should I do

Nmath avatar
ng flag
Edit your question and include more details. As currently written it's not clear what you need help with. Please include enough details that we know what you've done so far and where exactly you are stuck. Make sure to provide context so that we know what you are trying to do.
us flag
`uname -r` says that you are currently running kernel `5.11.0-41-generic`. Which kernel you want to download and compile is up to you. Are you sure that you want to "write the driver" for a new device, and not looking for a driver so that the computer would recognize the device?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.