-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idea: DKMS #6
Comments
Hi |
I see, maybe I misunderstood but I thought that this issue would be fixed by using |
Unfortunately rpi-source is currently unusable: awawa-dev/HyperHDR#968 (comment) |
That is very unfortunate, I looked at the code and there may still be hope to use the debian_method, I noticed:
There may be other parts that needs to be updated, unfortunately I do not have access to a raspberry at the moment EDIT: The regular expression should probably be closer to |
They removed versioning completely. You can extract SD image using 7zip and view this file.
|
It should be fine, the script (with the updated regex) would extract the |
OK, I think that should work. |
Had access to my raspbperry pi today, I submitted a patch to rpi-source to fix the issue : RPi-Distro/rpi-source#37 |
Good news, I got a working PoC!
dkms.conf:
p10_dkms.patch:
dkms-patchmodule.sh:
The file The configuration file is To use it the package
Done! |
Thank you! With |
I made a repository (thank you @ampledata for your boilerplate!) to build the DKMS as a .deb, meaning it can be installed as a regular package offering uvc/uvcvideo modules recompilation each time the kernel is updated, automatically. No need for custom images or packages freezing (or anything else) with this method, it would work on any Raspberry Pi OS installation. A github actions workflow is used to release the arm64 deb file. |
The Raspberry Pi operating system contains two kernels: one for the RPi5 and one for the others. I still need to figure out how to chroot them in the emulation so that it compiles both using their specific configuration and produce ready to boot universal image. |
Why would it be necessary? Isn't the .deb method sufficient to achieve P010 support? |
While building the image you don't know the final architecture that will be used after the installation. And you must prepare image for that. |
I see, so both kernel must first be patched at build time. Technically the .deb is agnostic so it would be possible to pre-install it and run a |
Couldn't we prepare and pre-build 2 directories with the dkms modules for 2 different kernel configurations when creating the image? And then just do dkms install from the appropriate directory during the first boot when we already know the architecture? |
That is a really good idea, it would eliminates the need for internet connection. I think that would work. Are the kernel versions also different or is it only the configurations? If it's only the configurations I think |
Only the configurations are different, they share the same kernel source. I think RPi5 is using |
I see, then this is the best case scenario. I don't think there is a need to modify the conf file anymore. The build flow would be similar to:
In the end it seems there will be no need for first-time boot commands |
I modified the script to use your improved Line 4 in 9671053
|
Absolutely. The idea behind the
I don't think it would be necessary to run these commands at all. The commands described in #6 (comment) should be sufficient to build the modules for both kernel and installing them |
On the other hand why 2023? |
Wow, where does that hash come from? It's a bit strange, and as you noticed it dates from two years ago, which doesn't make sense : raspberrypi/linux@0afb5e9 Only thing I can think of is that
No need to cry! The breaking commit dates from less than two years ago, the patch is actually up-to-date, it was that infamous hash that was not : raspberrypi/linux@466be4c So no worries, the patch need no modification at all ✌️ |
Another possibility is that |
Looking at the github actions logs it seems the correct kernel version is downloaded, on which machine/environment does the problem occur? |
Hello @BayLee4 😃 |
Clean install: I suspect they probably hid the 3rd kernel based on bullseye for the old devices but it breaks the DKMS phase and blocks it there. |
Hi @awawa-dev 👋
Wow that was effectively unexpected... How is it even possible? I did my tests on a fresh Raspberry Pi OS (64-bit) and never encountered that issue 🤔 Regardless, I updated my fix to |
Oh, maybe that's happening because |
Of course you're right, my mistake 🤦 🤦 🤦 🤦 🤦 ... so I had previously upgraded (actually installed it) a package that was no longer supported, although on the other hand I didn't notice any direct warnings there and I was relying on old scripts found on the net. And it froze the Kernal on version 6.1.21, at least in the changelog. A really interesting story that teaches us once again that we need to be careful at every step 😔 |
I just verified and the packages are indeed present in their bookworm distribution repository, where they do not belong, alongside a ton of other bullseye packages: https://archive.raspberrypi.org/debian/dists/bookworm/main/binary-arm64/Packages That is clearly an oversight on their part, renaming packages + still shipping obsolete ones with the same old name is a recipe for disaster.
Well,
I think that's because I believe the current names are |
Hi @BayLee4 😃 And wow...finally after some minor changes and fixes the Github Action script built me an image that works correctly.
then It only worked thanks to you, because you yourself proposed the idea and basically prepared all the necessary scripts. |
Hi @awawa-dev 👋 Just saw your nice
Great! Using In the PR I install To make it short, But thanks to your
And I want to thank you for your hard work on In addition to the above, the PR fixes the I think my mission ends here, please do the changes you see fit to the PR. I take this opportunity to thank you again, and wish you all the best for the future. |
Thank you very much. This is much more than I expected. I have already merged your changes. It seems to me that I still need to build the configs because the architecture alone may not be enough. In any case, they recommend doing this in their instructions https://www.raspberrypi.com/documentation/computers/linux_kernel.html make bcm2711_defconfig/bcm2712_defconfig. This will complicate the script a bit and will increase the image building time, but now after your changes it should be easy and I can handle it. Thank you very much again 😃 |
Are you referring to the (If you're curious, the experience was to try to get rid of the |
This was the last piece of the puzzle that I was missing: confirmation that the kernel configs exist and DKMS finds them correctly, so there is no need to build them or point them for DKMS manually. Thank you very much for clearing up my doubts 👍 |
Got the idea from here, but basically it should be possible to leverage DKMS to build the
uvc
module after patching it, every time the kernel is updated. Hopefully rpi-source exists to retrieve the newly updated kernel source. It would make any package freezing unnecessary, and building theuvc
module shouldn't be too demanding even for a raspberryThe text was updated successfully, but these errors were encountered: