thefloppydriver / pc2drc

Give your gamepad a new use!
GNU General Public License v2.0
60 stars 3 forks source link

Problems on Build Kernel Step 1 #1

Closed Special-Niewbie closed 2 years ago

Special-Niewbie commented 2 years ago

Describe the bug Hello @thefloppydriver ,

first of all congratulations for the project I love very much and I hope you are registered in the GBAtemp Forum, and if you have posted this news of this project there? Because in my opinion, this is a very important project and will make many people happy about (if you don't, I will do it for you).

Anyway, I am testing PC2DRC via a notebook that I use for testing, but unfortunately I can't go forward over to Stage 1 to build a new 5.11.22 kernel; and the error says (half in my language/ half in English) "impossible to read the module.order: File or Directory doesn't exist" ... and that I have to run the Make function before the Make install function. Any idea why about that (I try to post the picture below

To Reproduce Steps to reproduce the behavior:

  1. After start Stage 1, with frash installation of Ubuntu 20.04

Screenshots IMG_20220301_123624

Desktop (please complete the following information):

thefloppydriver commented 2 years ago

Hm. Try commenting out lines 59-72 in stage-1-kernel-patch.sh and tell me how that goes.

thefloppydriver commented 2 years ago

Yk what- It might be a problem with make oldconfig. I'll take a look at it and get back to you.

thefloppydriver commented 2 years ago

It's fixed. However, you should wait just a bit before cloning and running this because I'm about to remove the need to recompile the entire kernel. I'll post an update here once I've done that.

thefloppydriver commented 2 years ago

@Special-Niewbie Hello. I've been doing quite a bit of testing and I'm fairly certain that it's safe to run EXPERIMENTAL-stage-1-kernel-patch.sh instead of stage-1-kernel patch.sh. All other commands can be run normally. If you have any trouble running EXPERIMENTAL-stage-1-kernel-patch.sh, just run stage-1-kernel-patch.sh. Both of them work just fine, the EXPERIMENTAL one is a lot faster, though (an hour or more faster.)

Special-Niewbie commented 2 years ago

@Special-Niewbie Hello. I've been doing quite a bit of testing and I'm fairly certain that it's safe to run EXPERIMENTAL-stage-1-kernel-patch.sh instead of stage-1-kernel patch.sh. All other commands can be run normally. If you have any trouble running EXPERIMENTAL-stage-1-kernel-patch.sh, just run stage-1-kernel-patch.sh. Both of them work just fine, the EXPERIMENTAL one is a lot faster, though (an hour or more faster.)

Thank you so much @thefloppydriver , later I will try and go back to you with the results πŸ˜‰.

thefloppydriver commented 2 years ago

@Special-Niewbie stage-1-kernel-patch.sh now patches the current running kernel instead of patching, building, and installing 5.11.22. Everything is in order and I've merged all the changes. This version is much better! Instead of ~3 hours, stage 1 now takes less than 2 minutes.

Special-Niewbie commented 2 years ago

@Special-Niewbie stage-1-kernel-patch.sh now patches the current running kernel instead of patching, building, and installing 5.11.22. Everything is in order and I've merged all the changes. This version is much better! Instead of ~3 hours, stage 1 now takes less than 2 minutes.

Hi @thefloppydriver , yesterday I finished late to test it takes me 12 hours......not because of your build but because the machine that I'm testing it's an intel Atom.....

Anyway, I save all the reports, I anticipate to you that the EXPERIMENTAL come out with errors and the normal kernel it start took me 12 hours (so there is some step forward here) but I believe in last minute give me the error of building process.... So both still not working. Let me know if you need those reports, please. Now, you changed and it will patch the current Kernel, I understand well about? So, I need to test with this new kernel patch file?

thefloppydriver commented 2 years ago

@Special-Niewbie Yep, I changed everything out. Try cloning the project again and running ./stage-1-kernel-patch.sh Tell me how it goes!

Special-Niewbie commented 2 years ago

@Special-Niewbie Yep, I changed everything out. Try cloning the project again and running ./stage-1-kernel-patch.sh Tell me how it goes!

Perfect, thank you, I will let it to start now in this case because will take awhile with my little PC.....πŸ‘

Special-Niewbie commented 2 years ago

@thefloppydriver , this time make it more fast and still give the error of building as below......

IMG_20220306_113654.jpg

Seems there is some symbol in coding that it doesn't like during the building process.....

thefloppydriver commented 2 years ago

@Special-Niewbie It's alright! Thanks for testing! It should take less than 5 minutes!

thefloppydriver commented 2 years ago

It should've generated a text file in the pc2drc directory, could you send that to me?

Special-Niewbie commented 2 years ago

@Special-Niewbie It's alright! Thanks for testing! It should take less than 5 minutes!

Below, it's the generated report error.....

IMG_20220306_114231.jpg

thefloppydriver commented 2 years ago

Could you post the output of dmesg | grep mac80211

Special-Niewbie commented 2 years ago

Could you post the output of dmesg | grep mac80211

Here we go.....

IMG_20220306_114914.jpg

thefloppydriver commented 2 years ago

Strange.

Try rebooting and then running test -f "/sys/class/net/$(ip link show | grep -o -m1 "\w*wl\w*")/tsf && echo "it worked!"

Post the output of that command here

thefloppydriver commented 2 years ago

If that doesn't work, try sudo modprobe cfg80211

and then do sudo -E ./stage-1-kernel-patch.sh

Special-Niewbie commented 2 years ago

Strange.

Try rebooting and then running test -f "/sys/class/net/$(ip link show | grep -o -m1 "\w*wl\w*")/tsf && echo "it worked!"

Post the output of that command here

With this solution, it gives me the below error:

IMG_20220306_120220.jpg

Now I'm testing the second solution below , and I need to let it finish the building process....I will report shortly as soon it will finish the process.🀞🏻

thefloppydriver commented 2 years ago

There are a few typos in your command

try

test -f "/sys/class/$(ip link show | grep -o -m1 "\wwl\w")/tsf" && echo "it worked!"

thefloppydriver commented 2 years ago

also try sudo depmod -a if running sudo -E ./stage-1-kernel-patch.sh still doesn't work.

Special-Niewbie commented 2 years ago

If that doesn't work, try sudo modprobe cfg80211

and then do sudo -E ./stage-1-kernel-patch.sh

With this it gives me the same error as above ( Below , I re- attached the same pic because it's the same error)

IMG_20220306_114231.jpg

Everything I did after rebooting.....

thefloppydriver commented 2 years ago

also try sudo depmod -a if running sudo -E ./stage-1-kernel-patch.sh still doesn't work.

@Special-Niewbie How about this?

thefloppydriver commented 2 years ago

then running the kernel patch?

Special-Niewbie commented 2 years ago

also try sudo depmod -a if running sudo -E ./stage-1-kernel-patch.sh still doesn't work.

@Special-Niewbie How about this?

I'm testing now, sorry but I'm replying with the phone and I'm not in front of my principal PC, be patient that I'm a bit slow here.....

thefloppydriver commented 2 years ago

@Special-Niewbie Don't worry about it.

Special-Niewbie commented 2 years ago

then running the kernel patch?

Ok the "sudo depmod -a" seems okay, but when I run the Kernel Patch file, it gives me the error below:

IMG_20220306_122900.jpg

Seems always the same, there is some coding symbols into the mac80211 that it doesn't like to the building process or fr my experience I could miss some libs that allow the compiler to finish the building process.....

thefloppydriver commented 2 years ago

There are a few typos in your command

try

test -f "/sys/class/$(ip link show | grep -o -m1 "\w*wl\w*")/tsf" && echo "it worked!"

Just to confirm, this doesn't work, right?

Special-Niewbie commented 2 years ago

You see the picture below, after it tells that missing the parameters

IMG_20220306_123448.jpg

Special-Niewbie commented 2 years ago

There are a few typos in your command

try

test -f "/sys/class/$(ip link show | grep -o -m1 "\w*wl\w*")/tsf" && echo "it worked!"

Just to confirm, this doesn't work, right?

It doesn't work because cannot recognize the last symbol Exclamation point "!" (After "it worked" word). If I take out the Exclamation point , it goes to a second line and waiting me to input some other command

thefloppydriver commented 2 years ago

then running the kernel patch?

Ok the "sudo depmod -a" seems okay, but when I run the Kernel Patch file, it gives me the error below:

IMG_20220306_122900.jpg

Seems always the same, there is some coding symbols into the mac80211 that it doesn't like to the building process or fr my experience I could miss some libs that allow the compiler to finish the building process.....

@Special-Niewbie It's probably an issue involving dkms not having the right Module.symvers for the mac80211.ko module.

As the error says, I have no idea why this happens.

I'll talk to my uncle about it, he knows this stuff a lot better than I do.

My system configuration is very different from yours XD

thefloppydriver commented 2 years ago

There are a few typos in your command

try

test -f "/sys/class/$(ip link show | grep -o -m1 "\w*wl\w*")/tsf" && echo "it worked!"

Just to confirm, this doesn't work, right?

It doesn't work because cannot recognize the last symbol Exclamation point "!" (After "it worked" word). If I take out the Exclamation point , it goes to a second line and waiting me to input some other command

That's because of the typos, you didn't put a space between the -o and the -m1 and you didn't put a " at the end of /tsf

Special-Niewbie commented 2 years ago

then running the kernel patch?

Ok the "sudo depmod -a" seems okay, but when I run the Kernel Patch file, it gives me the error below:

IMG_20220306_122900.jpg

Seems always the same, there is some coding symbols into the mac80211 that it doesn't like to the building process or fr my experience I could miss some libs that allow the compiler to finish the building process.....

@Special-Niewbie It's probably an issue involving dkms not having the right Module.symvers for the mac80211.ko module.

As the error says, I have no idea why this happens.

I'll talk to my uncle about it, he knows this stuff a lot better than I do.

My system configuration is very different from yours XD

It's okay, because I don't use my principal Ubuntu installation and I use a fresh installation with a testing PC, please let me know if I need to use another OS Distro from Linux? As you said you have totally different configuration, why are you using another Linux Distro?

thefloppydriver commented 2 years ago

@Special-Niewbie By "system configuration" I mean my physical system configuration, as in the hardware in my PC.

Do you have secure-boot enabled?

thefloppydriver commented 2 years ago

@Special-Niewbie Are you using Google translate? "typo" is a way of saying "misspelling"

Special-Niewbie commented 2 years ago

@Special-Niewbie Are you using Google translate? "typo" is a way of saying "misspelling"

No, I'm not English native language, and I'm with kids around, testing the machine and write as fast as I can with the phone to give you as soon as possible a report...... Sorry for thatπŸ˜‰

thefloppydriver commented 2 years ago

@Special-Niewbie It's alright! I get it πŸ˜‚ I'll research this more tomorrow and try to reproduce the issue, but I need to get some rest.

Special-Niewbie commented 2 years ago

@Special-Niewbie By "system configuration" I mean my physical system configuration, as in the hardware in my PC.

Do you have secure-boot enabled?

I was checking in the BIOS, about the Secure Boot, and this laptop doesn't have even such basic BIOS voice to select. So, the unique kind of Secure Boot that I found , was under another name .... now I disabled it, and let's see what will happens.... Otherwise I need to switch with another PC (this time PC Desktop and not notebook) if this still persists me to give this error. Because here you could have right as the Secure Boot maybe enable by default it doesn't allowing with process.....

Special-Niewbie commented 2 years ago

@Special-Niewbie It's alright! I get it πŸ˜‚ I'll research this more tomorrow and try to reproduce the issue, but I need to get some rest.

Okay, take your time, I will try to prepare another PC for testing, and this afternoon I will go around to find an English Native Writer to write and communicate with you.... πŸ˜…πŸ˜‚

Stormy178 commented 2 years ago

I'm currently having similar issues, but instead of inserting the modules, it couldn't find them. I have attached the generated log.txt as well as copied command output (btw it starts after the kernel base as the script works successfully up to that point). I also have a suggestion of notifying advanced users to open a new terminal if they wish to modify the kernel .config file before continuing QUICK EDIT! I should also mention I'm running Pop!OS 21.10 on kernel version 5.16.11

generated_bug_report.txt pc2drc-kernelpatch.log

thefloppydriver commented 2 years ago

I'm currently having similar issues, but instead of inserting the modules, it couldn't find them. I have attached the generated log.txt as well as copied command output (btw it starts after the kernel base as the script works successfully up to that point). I also have a suggestion of notifying advanced users to open a new terminal if they wish to modify the kernel .config file before continuing QUICK EDIT! I should also mention I'm running Pop!OS 21.10 on kernel version 5.16.11

generated_bug_report.txt pc2drc-kernelpatch.log

@Stormy178 Thanks for sharing! Could you try running test -f "/sys/class/$(ip link show | grep -o -m1 '\w*wl\w*')/tsf" && echo "it worked!"

thefloppydriver commented 2 years ago

I'm currently having similar issues, but instead of inserting the modules, it couldn't find them. I have attached the generated log.txt as well as copied command output (btw it starts after the kernel base as the script works successfully up to that point). I also have a suggestion of notifying advanced users to open a new terminal if they wish to modify the kernel .config file before continuing QUICK EDIT! I should also mention I'm running Pop!OS 21.10 on kernel version 5.16.11

generated_bug_report.txt pc2drc-kernelpatch.log

@Stormy178 SIGH. I wish Ubuntu made it easy to programmatically grab their kernel sources, because there are sometimes breaking changes between the unmodified linux kernel version and the ubuntu linux kernel version. Try running sudo -E ./kernel-patch-files/build-patched-kernel.sh until I figure out a good solution :)

(P.S. I'm not claiming support for PopOS or 21.04 :joy:, I usually stick to LTS versions of Ubuntu)

thefloppydriver commented 2 years ago

I'm going to add some steps that instruct the user to get their kernel sources and put them in the kernel-patch-files directory under the name, "linux-kernel-sources"

I hate doing it this way but it's the only way to guarantee that the kernel patch works. I should have it pushed by the end of the day. Sorry things turned out this way!

thefloppydriver commented 2 years ago

I'm going to add some steps that instruct the user to get their kernel sources and put them in the kernel-patch-files directory under the name, "linux-kernel-sources"

I hate doing it this way but it's the only way to guarantee that the kernel patch works. I should have it pushed by the end of the day. Sorry things turned out this way!

@Stormy178 Well! I did it! Try deleting the repo and trying again with a fresh cloned version!

Special-Niewbie commented 2 years ago

@thefloppydriver , I'm still trying to build it in the old notebook with your latest code changes.

There is a small step forward, but it still gives me an error, I attach the photo below:

Schermata da 2022-03-07 11-01-27.png

Now, I have run the second function Optional .... / kernel-patch-files / .... if that also doesn't work, I will try to change the PC, I still haven't changed PC for this test because it takes me some time to prepare it with a fresh Linux installation.

In the meantime, I noticed 3 error warnings that maybe you might be interested in, you can find them below in this other image, the error tells about of the "m" symbol value (maybe it's useful for you or maybe not, but I just trying to give you any feedback to help even if could be useless).....

IMG_20220307_112901.jpg

thefloppydriver commented 2 years ago

@Special-Niewbie Thanks for trying it out! That 'm' warning is harmless :)

Could you send me a screenshot of the output of cat /var/lib/dkms/drc-mac80211/0.1.0/5.13.0-30-generic/x86_64/log/make.log or attach the file?

Special-Niewbie commented 2 years ago

@Special-Niewbie Thanks for trying it out! That 'm' warning is harmless :)

Could you send me a screenshot of the output of cat /var/lib/dkms/drc-mac80211/0.1.0/5.13.0-30-generic/x86_64/log/make.log or attach the file?

I have attached the "make.log" file below....... make.log

thefloppydriver commented 2 years ago

Looks the same as mine, it should be working I don't know why it isn't :sweat_smile: Try rebooting and then running the command below modprobe mac80211 && test -f "/sys/class/net/$(ip link show | grep -o -m1 "\w*wl\w*")/tsf" && echo "Hooray!"

If it outputs "Hooray!" then you should be able to run stage-2

Special-Niewbie commented 2 years ago

Looks the same as mine, it should be working I don't know why it isn't πŸ˜… Try rebooting and then running the command below modprobe mac80211 && test -f "/sys/class/net/$(ip link show | grep -o -m1 "\w*wl\w*")/tsf" && echo "Hooray!"

If it outputs "Hooray!" then you should be able to run stage-2

Ok, in this case I stop the process I started with the sudo -E ./kernel-patch-files/build-patched-kernel.sh function, and try to do as you say. It seems that I have found the problems related to this problem, and it seems that the problem it is in between the SIGN DRIVER and the SECURE BOOT.

I'll give you these two Posts: 1) https://askubuntu.com/questions/1348250/skipping-btf-generation-xxx-due-to-unavailability-of-vmlunux-on-ubuntu-21-04-ge

2) https://github.com/mkubecek/vmware-host-modules/issues/87#issuecomment-800051833

But as I told you, this notebook does not have SECURE BOOT as an option to disable it and the BIOS is in Legacy and not in UEFI.

thefloppydriver commented 2 years ago

I see! That's odd as all computers that I've seen have had a secure boot option. Maybe it's buried somewhere in the BIOS settings or called something different, it could be Intel TPM

Special-Niewbie commented 2 years ago

I see! That's odd as all computers that I've seen have had a secure boot option. Maybe it's buried somewhere in the BIOS settings or called something different, it could be Intel TPM

Yes it's really odd, also for me it's first time to see a PC/notebook without Secure Boot , TPM or what so ever.

This notebook I took from someone that was going to drop it in the trash bin. So, I use it just for tests...the unique voice in the Bios that Samsung made (as a Secure Boot) they calls EDB (Execute Disable Bit), I already disable it.

To update you, finally after another reboot I can install the patch but with modprobe error, please look the picture below:

IMG_20220307_134336.jpg