Helios4?

Ask questions about Arch Linux ARM. Please search before making a new topic.

Re: Helios4?

Postby summers » Wed Feb 06, 2019 10:55 am

Yes - good that you are on the right device tree - that will solve many problems.

That the kernel driver isn't capable of driving the pwm for the fan would explain the problem. Maybe encourage the patch to be sent into mainline?

Oh yes the error you are getting is form the TI am335x processor, that is used in the beagle family. I get it every time I compile a kernel on my beagle farm, which is where I compile most armv7 code. I suspect one of the patches here will fix:

https://archlinuxarm.org/packages/armv7h/linux-am33x/files

Anyway I with 30 minutes of fiddling couldn't find a *good* solution.

But for you its easy - you are on an armada processor. So way to fix is inside
Code: Select all
make menuconfig
something like 3rd tab down is to configure which hardware you are on. You probably have all armv7 selected. Thing to do is to just deselect all except for your aramada. That will mean it won't event give you the option of selecting the TI options, or any other that you can't use on your machine.

It will also make the compilation quicker, compiling on these arm boards for me takes about 24 hours! Its worth doing though just to ensure its set up for your environment ...
summers
 
Posts: 611
Joined: Sat Sep 06, 2014 12:56 pm

Re: Helios4?

Postby Chal » Wed Feb 06, 2019 9:58 pm

Thanks for the explanations and the tip. Compilation resumed... ;)
Chal
 
Posts: 9
Joined: Sat Feb 02, 2019 6:52 pm

Re: Helios4?

Postby Chal » Thu Feb 07, 2019 10:08 pm

Well, compilation on Helios4 only was way too long. Took some time to learn how to configure distcc. Much better now!

Got at last a compiled kernel. Had to make additional changes to the .config file again to remove some useless binary blobs.

Unfortunately, I didn't see that the patch was silently not applied. Furthermore, I realized later that it is not compatible with kernel 4.20.5.

Have to find a way to contact the Kobol team to get a compatible patch.
Chal
 
Posts: 9
Joined: Sat Feb 02, 2019 6:52 pm

Re: Helios4?

Postby summers » Fri Feb 08, 2019 8:08 pm

A good way to get a config file, is to grab
Code: Select all
/proc/config.gz
from a working kernel, copy into the kernel to be compiled, and then do
Code: Select all
make oldconfig
. That way you can see what they did before.

With the patch, rather than applying it automatically - try doing it line by line by hand. Then you can hopefully see what code has changed since then, and so what is needed from the patch ...
summers
 
Posts: 611
Joined: Sat Sep 06, 2014 12:56 pm

Re: Helios4?

Postby Chal » Fri Feb 08, 2019 11:37 pm

Using /proc/config.gz is a good tip. Thank you. Later I would like to make a linux-helios4 pkgbuild with a specific config file to have a kernel optimized for Helios4. But using an existing config.gz first is already a good base.

Regarding the patch, actually it almost applies correctly. Only one section fails. I tried to look at the changes line by line as you suggest but differences with kernel 4.20.5 look big to me. Method names and number of arguments changed. And I think all this section of the patch should be rewritten to be correctly adapted to this kernel version. It's out of my hands.

The good news is I contacted people from the Kobol team and they kindly answered to me. They put me in touch with the author of the patch. He already tried to adapt it to be merged in upstream kernel. So I hope I could get a compatible patch in the coming days.

Stay tuned!
Chal
 
Posts: 9
Joined: Sat Feb 02, 2019 6:52 pm

Re: Helios4?

Postby Chal » Sun Feb 10, 2019 5:12 pm

Probably to impatient and excited to get a fully working version of Arch for Helios4, I made a second try to get an updated patch for Linux 4.20.5 myself. And, well, it compiles and seems to work! I sent it to the author of the original patch for review.

So without the patch, here is the list of available devices for hardware monitoring:
Code: Select all
$ ls -l /sys/class/hwmon/
total 0
lrwxrwxrwx 1 root root 0 Feb 10 16:41 hwmon0 -> ../../devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Feb 10 16:41 hwmon1 -> ../../devices/virtual/thermal/thermal_zone0/hwmon1
lrwxrwxrwx 1 root root 0 Feb 10 16:41 hwmon2 -> ../../devices/platform/j10-pwm/hwmon/hwmon2

After loading the lm75 kernel module:
Code: Select all
$ modprobe lm75
$ ls -l /sys/class/hwmon/
total 0
lrwxrwxrwx 1 root root 0 Feb 10 16:41 hwmon0 -> ../../devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Feb 10 16:41 hwmon1 -> ../../devices/virtual/thermal/thermal_zone0/hwmon1
lrwxrwxrwx 1 root root 0 Feb 10 16:41 hwmon2 -> ../../devices/platform/j10-pwm/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Feb 10 16:41 hwmon3 -> ../../devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c/hwmon/hwmon3

And finally with the lm75 module and the updated patch:
Code: Select all
$ ls -l /sys/class/hwmon/
total 0
lrwxrwxrwx 1 root root 0 Feb 10 16:45 hwmon0 -> ../../devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Feb 10 16:45 hwmon1 -> ../../devices/virtual/thermal/thermal_zone0/hwmon1
lrwxrwxrwx 1 root root 0 Feb 10 16:45 hwmon2 -> ../../devices/platform/j10-pwm/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Feb 10 16:45 hwmon3 -> ../../devices/platform/j17-pwm/hwmon/hwmon3
lrwxrwxrwx 1 root root 0 Feb 10 16:45 hwmon4 -> ../../devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c/hwmon/hwmon4

The second fan is now available.

There is however a difference with the output shown on the Helios wiki:
Code: Select all
ls -l /sys/class/hwmon/
total 0
lrwxrwxrwx 1 root root 0 Nov  7 07:23 hwmon0 -> ../../devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Nov  7 07:23 hwmon1 -> ../../devices/virtual/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 Nov  7 07:23 hwmon2 -> ../../devices/platform/j10-pwm/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 Nov  7 07:23 hwmon3 -> ../../devices/platform/j17-pwm/hwmon/hwmon3
lrwxrwxrwx 1 root root 0 Nov  7 07:23 hwmon4 -> ../../devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c/hwmon/hwmon4

The hwmon1 symlink does not point to the same device.

Reading the current PWM works:
Code: Select all
$ cat /sys/class/hwmon/hwmon2/pwm1
255
$ cat /sys/class/hwmon/hwmon3/pwm1
255

Setting PWM works also:
Code: Select all
$ echo 128 > /sys/class/hwmon/hwmon2/pwm1
$ echo 128 > /sys/class/hwmon/hwmon3/pwm1

It feels so good on the ears! :D

I then tried to configure the fancontrol service. Following instructions on the Helios4 wiki, I used the udev rules provided for Armbian. Here is the result:
Code: Select all
$ ls -l /dev/{fan,thermal}-*
lrwxrwxrwx 1 root root  42 Feb 10 16:45 /dev/fan-j10 -> /sys/devices/platform/j10-pwm/hwmon/hwmon2
lrwxrwxrwx 1 root root  42 Feb 10 16:45 /dev/fan-j17 -> /sys/devices/platform/j17-pwm/hwmon/hwmon3
lrwxrwxrwx 1 root root  82 Feb 10 16:45 /dev/thermal-board -> /sys/devices/platform/soc/soc:internal-regs/f1011000.i2c/i2c-0/0-004c/hwmon/hwmon4
lrwxrwxrwx 1 root root 118 Feb 10 16:45 /dev/thermal-eth -> /sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0

All symlinks are created in /dev/ excepted /dev/thermal-cpu for unknown reasons. Is it related to the hwmon1 symlink in /sys/class/hwmon that does not point to the same device as on Armbian?

Any advice from udev experts is welcome ;)
Chal
 
Posts: 9
Joined: Sat Feb 02, 2019 6:52 pm

Previous

Return to User Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron