-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support for Ubuntu 21.10 #11
Conversation
Ubuntu stores overlays under `/boot/firmware/overlays`, instead of just `/boot/overlays` like many other operating systems for the Pi. The location of the folder where `overlays` can be found is defined in `/etc/default/rpi-eeprom-update`. This change checks that file for `BOOTFS`, and defaults to `/boot` if not defined there.
This builds just fine on 5.13 (and probably 5.11 and 5.12 too). Ubuntu 21.10, which is the suggested version of Ubuntu Server to install for the CM4, runs on 5.13. This does not, however, seem to properly install. DKMS will build it, and place it under `/lib/modules/5.13.0-1010-raspi/updates/dkms/emc2301.ko`, but not under `/lib/modules/5.13.0-1010-raspi/kernel/drivers/hwmon/`. If we manually load the module with `insmod`, the fan is properly controlled.
I figured out that Ubuntu doesn't auto-load the module, so you have to tell it to load automatically. I have updated the summary to reflect this, as I now have this working correctly under Ubuntu 21.10 with this set of changes. |
@neg2led, ping on review of this change since you mentioned elsewhere that your notifications got messed up and you missed some things :) |
Thanks! I've been going through all of these now I've realized that GitHub failed me on the notification front... Interesting on the lack of auto-load - did you do an I used the same module target path that's used in some other DKMS drivers for things on Pis, as I'm told placing DKMS modules directly under Could I get you to drop the README.md changes & the dkms.conf version compatibility string change, then squash these commits together? This should build and load on any 5.10+ kernel without any trouble, and 2143df6 limits it to only 5.10/5.13 (while what's currently in there should allow any 5.10+ to attempt a build). I'll be updating the README later today (once I'm off work) to say "Tested to work on 5.10.y and [other reported successes]" along with a couple of other things. Apart from that, happy to merge this 😄 |
It probably won't be until this weekend until I can give it a go with my hardware again. It's possible I did not run the |
Thanks for merging this. The project that I was working with this has been on hold for a bit, so I haven't had the chance to get back to addressing what you asked. Looks like you fixed it up such that it'll work for 22.04 as well, which is much appreciated. |
Context
Ubuntu stores overlays under
/boot/firmware/overlays
, instead of just/boot/overlays
like many other operating systems for the Pi. The location of the folder whereoverlays
can be found is defined in/etc/default/rpi-eeprom-update
.Ubuntu 21.10, which is the suggested version of Ubuntu Server to install for the CM4, uses kernel 5.13. This builds just fine on 5.13 (and probably 5.11 and 5.12 too).
Changes
/etc/default/rpi-eeprom-update
forBOOTFS
variable, and default to/boot
ifnot defined there to properly install the overlay on Ubuntu
BUILD_EXCLUSIVE_KERNEL
regex andREADME.md
to support 5.13.y in addition to 5.10.yAdditional Notes
DKMS will build it, and place it under
/lib/modules/5.13.0-1010-raspi/updates/dkms/emc2301.ko
. At this point, the module can be manually loaded withinsmod
, and the fan is properly controlled. However, it does not load automatically at boot unless one tells Ubuntu to do so. I did so by adding a file under/etc/modules-load.d/
calledcm4fan.conf
with a single line in it containing the textemc2301
.