Armbian for Rock 3A (unofficial build) with mainline kernel

Now that you pointed it out, I just erased the sdcard to make it mbr and it worked.
Strange thing though, I had the feeling that the image itself would override the partition scheme, no?

The image partition type is DOS. It should overwrite the SD card partition type. I’ve made a test:
flash the image to the SD card after changing the partition type by running command like /sbin/parted -s /dev/sdb mklabel gpt. The SD card partition type will be DOS back. Maybe there’s something special on your SD card.

For that one I used macos to generate the image, that could be the reason :man_shrugging:
I will add an entry on the wiki to make sure some other people don’t hit this again

@piter75 from armbian has found the root cause: https://forum.armbian.com/topic/12352-orange-pi-4/page/3/#comment-94322

If you use macos to generate the images, make sure you use the gnu utils instead of the macos bsd utils.

brew install coreutils

and add /opt/homebrew/bin to your PATH.

Update 20220626
Armbian has disabled the pwm patch from legacy kernel: https://github.com/armbian/build/pull/3928. To make our pwm fan overlay work, there should be some modification: https://github.com/armbian/build/pull/3935. We have to replace the active to default. So the pwm fan overlay file should be like:

/dts-v1/;
/plugin/;

/ {
	compatible = "rockchip,rk3568";

	fragment@0 {
		target = <&pwm8>;

		__overlay__ {
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&pwm8m0_pins>;
		};
	};
};
1 Like

I have been unable to get this working on Armbian 22.08

#!/bin/bash
cat << EOF >> ~/rk3568-pwm8-m0-fan.dts
/dts-v1/;
/plugin/;

/ {
	compatible = "rockchip,rk3568";

	fragment@0 {
		target = <&pwm8>;

		__overlay__ {
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&pwm8m0_pins>;
		};
	};
};
EOF

armbian-add-overlay rk3568-pwm8-m0-fan.dts

cat > /etc/systemd/system/fan-control.service <<EOF
[Service]
RemainAfterExit=true
ExecStart=bash -exc '\
echo 0 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/export || true; \
echo 10000 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/period && \
echo 5000 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/duty_cycle && \
echo normal > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/polarity && \
echo 1 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/enable'
ExecStop=bash -exc 'echo 0 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/enable'

[Install]
WantedBy=multi-user.target
EOF

systemctl enable fan-control.service

reboot now

Any ideas?

Which kernel do you use. What’s your output of uname -a?

Sorry I’ve been away and I don’t have access at the moment:

Linux rock3a 5.18.12-rk35xx #trunk.0071 SMP PREEMPT Fri Jul 15 09:43:22 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Updated to supported image instead of using one that I compiled to use AX210 card:

https://www.armbian.com/rock-3a/

Linux rock-3a 5.19.5-rk35xx #22.08.1 SMP PREEMPT Tue Aug 30 07:09:39 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Still getting the same issue.

fan-control service is working:

root@rock-3a:~# systemctl status fan-control
● fan-control.service
 Loaded: loaded (/etc/systemd/system/fan-control.service; enabled; vendor preset: enabled)
 Active: active (exited) since Thu 2022-09-15 16:36:43 BST; 6min ago
Process: 1478 ExecStart=bash -exc echo 0 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/export || true; echo 10000 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/period && echo 5000 > /sys/devices/platform/fe6f>
   Main PID: 1478 (code=exited, status=0/SUCCESS)
    CPU: 10ms

Sep 15 16:36:43 rock-3a systemd[1]: Started fan-control.service.
Sep 15 16:36:43 rock-3a bash[1478]: + echo 0
Sep 15 16:36:43 rock-3a bash[1478]: + echo 10000
Sep 15 16:36:43 rock-3a bash[1478]: + echo 5000
Sep 15 16:36:43 rock-3a bash[1478]: + echo normal
Sep 15 16:36:43 rock-3a bash[1478]: + echo 1

but the fan is not on and even if i manually push the command it stays off

any ideas would be appreciated

I can’t see any problems from your info. Here is what I did to start the fan:
1, install overlay using armbian-add-overlay command just like you did
2, create a shell script /usr/local/bin/start-pwm-fan.sh:

#!/bin/bash
echo 0 > /sys/class/pwm/pwmchip0/export
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 3000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo normal > /sys/class/pwm/pwmchip0/pwm0/polarity
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable

sudo chmod +x /usr/local/bin/start-pwm-fan.sh
3, add /usr/local/bin/start-pwm-fan.sh to /etc/rc.local

1 Like

yeah the only difference is your fan is working and mine isn’t
it does do the boot spin so its not the fan or power it juts wont work during normal use

rookie error - forgot to attach the cable to the main board

Note: I was seeing the fan run at boot and that was what made me think there was nothing else amiss

all good now though

Thanks for doing this. Armbian still does not support panfrost on 6.0.y kernel. I’m not sure why they are not configuring it in, but they aren’t. This little cpu just isn’t enough to be used with any graphical display without that gpu being used.

Still can’t use this though because wireguard can’t be installed because it requires linux-image-rt-6.0 or something and that won’t install for some reason. Then apt completely breaks because of this, needing to dpkg -r --force-depends wireguard or something. I don’t know, but there are some major incompatibilities with using the apt sources provided.

armbian edge should have panfrost built as module: https://github.com/armbian/build/blob/master/config/kernel/linux-rockchip64-edge.config#L6057

I downloaded directly from their site, the debian minimal image and it did not have panfrost. I really don’t want to build a custom image.

Installation might break because it tries to recompile module which already exists in the kernel. https://github.com/armbian/build/blob/master/config/kernel/linux-rockchip64-edge.config#L2662

Wireguard works OOB. You don’t need to do anything except configuring it.

Minimal image contains “nothing”, certainly there are no user-space libraries to support Panfrost. Try Jammy Gnome desktop image if you don’t want to build from scratch. Panfrost most likely works OOB.

Well I won’t use Ubuntu so I guess im SOL until Armbian releases a Debian XFCE version.

Armbian is a well maintained build framework. Build it on your own or just enable for next time:

Ok so I’m guessing the 3dsupport flag is what enables panfrost?
Adding this line would be sufficient to enable the build?

rock-3a                   edge            bullseye       desktop                  stable         yes            xfce          config_base   3dsupport,desktop_tools,editors,internet,multimedia