how to get pi poe hat fan drivers working on aarch64?

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

how to get pi poe hat fan drivers working on aarch64?

Postby cbc02009 » Tue Mar 29, 2022 7:00 pm

I've confirmed on a seperate install that the fan functions normally on the armv7 version. The linux module exists on the aarch64 version (can modprobe pwn_fan and pwm_raspberrypi_poe), but they don't seem to do anything. I noticed there is one module that isn't included (rpi_poe_power) but I have literally no experience adding drivers to the linux kernel. I tried using dkms via PKGBUILD, but it's giving me errors even though everything looks fine in the build log:
$this->bbcode_second_pass_code('', 'DKMS make.log for rpi-poe-power-0.1.0 for kernel 5.17.0-1-aarch64-ARCH (aarch64)
Tue Mar 29 06:46:58 PM UTC 2022
make -C /usr/lib/modules/5.17.0-1-aarch64-ARCH/build M=/var/lib/dkms/rpi-poe-power/0.1.0/build modules
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: Entering directory '/usr/lib/modules/5.17.0-1-aarch64-ARCH/build'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-unknown-linux-gnu-gcc (GCC) 11.2.0
You are using: gcc (GCC) 11.2.0
CC [M] /var/lib/dkms/rpi-poe-power/0.1.0/build/rpi_poe_power.o
MODPOST /var/lib/dkms/rpi-poe-power/0.1.0/build/Module.symvers
CC [M] /var/lib/dkms/rpi-poe-power/0.1.0/build/rpi_poe_power.mod.o
LD [M] /var/lib/dkms/rpi-poe-power/0.1.0/build/rpi_poe_power.ko
make[1]: Leaving directory '/usr/lib/modules/5.17.0-1-aarch64-ARCH/build'')

here's the mkpkg -si error:
$this->bbcode_second_pass_code('', 'Error! Build of rpi-poe-power.ko failed for: 5.17.1-1-aarch64-ARCH (aarch64)
Make sure the name of the generated module is correct and at the root of the
build directory, or consult make.log in the build directory
/var/lib/dkms/rpi-poe-power/0.1.0/build for more information.
==> WARNING: `dkms install --no-depmod rpi-poe-power/0.1.0 -k 5.17.1-1-aarch64-ARCH' exited 7
')

Am I at least on the right path with DKMS? or is there something else I'm missing that needs to be done?
cbc02009
 
Posts: 12
Joined: Wed May 05, 2021 12:58 pm

Re: how to get pi poe hat fan drivers working on aarch64?

Postby graysky » Tue Mar 29, 2022 8:22 pm

Both linux-rpi packages (armv7h and aarch64) ship with that module.
$this->bbcode_second_pass_code('', '% grep -i poe_power config
CONFIG_RPI_POE_POWER=m

% grep -i poe_power config8
CONFIG_RPI_POE_POWER=m
')

You are not running linux-rpi it seems, you are running linux-aarch64. That is your problem.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: how to get pi poe hat fan drivers working on aarch64?

Postby robg » Tue Mar 29, 2022 11:05 pm

When you refer to the makepkg error, I assume that you are trying to build rpi-poe-fan-dkms-git?

It seems (judging from the source files in the linked PKGBUILD) that the package is out of date. Either contact the maintainer or try updating to the latest commit.
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: how to get pi poe hat fan drivers working on aarch64?

Postby cbc02009 » Wed Mar 30, 2022 2:45 am

$this->bbcode_second_pass_quote('graysky', 'B')oth linux-rpi packages (armv7h and aarch64) ship with that module.
$this->bbcode_second_pass_code('', '% grep -i poe_power config
CONFIG_RPI_POE_POWER=m

% grep -i poe_power config8
CONFIG_RPI_POE_POWER=m
')

You are not running linux-rpi it seems, you are running linux-aarch64. That is your problem.



I installed with the ArchLinuxARM-rpi-aarch64-latest.tar.gz image. Is that not the correct image? Should I be using something else? uname -a gives:
$this->bbcode_second_pass_code('', 'Linux Kokoro 5.17.1-1-aarch64-ARCH #1 SMP Mon Mar 28 23:54:20 UTC 2022 aarch64 GNU/Linux
')

$this->bbcode_second_pass_quote('robg', 'W')hen you refer to the makepkg error, I assume that you are trying to build rpi-poe-fan-dkms-git?

It seems (judging from the source files in the linked PKGBUILD) that the package is out of date. Either contact the maintainer or try updating to the latest commit.


I was trying to make my own pkgbuild, since that one is definitely out of date.
cbc02009
 
Posts: 12
Joined: Wed May 05, 2021 12:58 pm

Re: how to get pi poe hat fan drivers working on aarch64?

Postby graysky » Wed Mar 30, 2022 10:21 am

Install the Raspberry Pi Foundation fork of the kernel via linux-rpi if you want Pi-specific stuff
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: how to get pi poe hat fan drivers working on aarch64?

Postby cbc02009 » Wed Mar 30, 2022 11:32 am

$this->bbcode_second_pass_quote('graysky', 'I')nstall the Raspberry Pi Foundation fork of the kernel via linux-rpi if you want Pi-specific stuff


Thanks for the clarification. So the workflow is to install the image I mentioned above and then update the kernel with pacman? I just want to make sure so I can update my install scripts appropriately. Also does the fork still use uboot?

I would like to figure out the DKMS thing someday, but at least this will get me up and running.

Thanks for your help!
cbc02009
 
Posts: 12
Joined: Wed May 05, 2021 12:58 pm
Top

Re: how to get pi poe hat fan drivers working on aarch64?

Postby graysky » Wed Mar 30, 2022 12:10 pm

linux-rpi does not use uboot

I believe this is all you need to switch over:
$this->bbcode_second_pass_code('', 'pacman -S --needed linux-rpi raspberrypi-bootloader raspberrypi-firmware')
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 1 guest