| 7 Jul 2023 |
| @lotte:chir.rs changed their profile picture. | 05:31:03 |
fgaz | In reply to @fgaz:matrix.org sent an image. https://github.com/NixOS/nixos-hardware/pull/662 | 19:34:35 |
raitobezarius | Redacted or Malformed Event | 19:38:51 |
Alex | In reply to @fgaz:matrix.org https://github.com/NixOS/nixos-hardware/pull/662 I'm currently compiling with a few patches applied to try to fix the compilation problems without disabling DRM, since I'd really like to get working HDMI on my VF2.
I'll share the configuration if I'm able to get it working. Given the similarities between the two SBCs (and their respective Linux fork), it might work for the Star64 too. | 20:43:23 |
| 8 Jul 2023 |
misuzu | In reply to @alex:tunstall.xyz
Has anyone worked out how to get the VF2 to run at 1.5GHz?
I'm using a kernel with the AXP15060 enabled and all the patches for PMIC and CPU freq applied, but the system still runs at 1GHz (the boot clock rate).
[nixos@nixos:/etc/nixos/nixos-vf2]$ sudo cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_{cur,max}_freq
1000000
1500000
[nixos@nixos:/etc/nixos/nixos-vf2]$ sudo cat /sys/devices/system/cpu/cpufreq/policy0/scaling_{driver,governor,cur_freq}
cpufreq-dt
performance
1500000
It's even worse now, haha
% sudo grep '' /sys/devices/system/cpu/cpufreq/policy0/*
/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0 1 2 3
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq:500000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:375000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:4294967295
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0 1 2 3
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:375000 500000 750000 1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:performance schedutil
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:cpufreq-dt
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:performance
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>
% uname -a
Linux nixos 6.4.0 #1-NixOS SMP Tue Jan 1 00:00:00 UTC 1980 riscv64 GNU/Linux
| 19:26:23 |
Alex | In reply to @misuzu:matrix.org
It's even worse now, haha
% sudo grep '' /sys/devices/system/cpu/cpufreq/policy0/*
/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0 1 2 3
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq:500000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:375000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:4294967295
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0 1 2 3
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:375000 500000 750000 1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:performance schedutil
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:cpufreq-dt
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:performance
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:1500000
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>
% uname -a
Linux nixos 6.4.0 #1-NixOS SMP Tue Jan 1 00:00:00 UTC 1980 riscv64 GNU/Linux
I was on upstream 6.4.0 (from commit 4964ce0a869e) when I wrote that. I assume from your repository that this behaviour is from a build of e5a381c51d624ffd8784db908a58ae227d0608a4? | 19:38:50 |
misuzu | In reply to @alex:tunstall.xyz I was on upstream 6.4.0 (from commit 4964ce0a869e) when I wrote that. I assume from your repository that this behaviour is from a build of e5a381c51d624ffd8784db908a58ae227d0608a4? Yep. Though probably it's because of my non-vendor u-boot | 19:41:11 |
Alex | It might not be a u-boot issue because when I booted the vendor's Debian image using the same u-boot I use for NixOS, it ran at 1.5 GHz. Or maybe you've run into a completely different problem with similar symptoms? | 19:42:46 |
Alex | By the way, the latest vendor u-boot is not flashable with the kernel from the upstream branch, because of the partition table in the DTB. | 19:44:42 |
misuzu | In reply to @alex:tunstall.xyz By the way, the latest vendor u-boot is not flashable with the kernel from the upstream branch, because of the partition table in the DTB. That's likely a kernel issue, I've had no issues flashing latest firmware via recovery | 19:48:11 |
misuzu | In reply to @alex:tunstall.xyz It might not be a u-boot issue because when I booted the vendor's Debian image using the same u-boot I use for NixOS, it ran at 1.5 GHz. Or maybe you've run into a completely different problem with similar symptoms? That's just a hunch, I need to check with vendor firmware to be sure | 19:50:00 |
Alex | In reply to @misuzu:matrix.org That's likely a kernel issue, I've had no issues flashing latest firmware via recovery It is: the DTB comes from the kernel. | 19:50:29 |
misuzu | In reply to @alex:tunstall.xyz It is: the DTB comes from the kernel. I've just tried 6.4.0-rc6 and it's still at 500000 | 19:52:50 |
Alex | In reply to @misuzu:matrix.org I've just tried 6.4.0-rc6 and it's still at 500000 How interesting. Perhaps that is the default at boot and the system is unable to change it?
If you set the governor to userspace and try setting other frequencies via scaling_setspeed, are you able to get anything other than 500 MHz? | 19:54:54 |
misuzu | In reply to @alex:tunstall.xyz
How interesting. Perhaps that is the default at boot and the system is unable to change it?
If you set the governor to userspace and try setting other frequencies via scaling_setspeed, are you able to get anything other than 500 MHz? Nope, tried 375000, 750000 and 1500000, still 500000 | 19:56:52 |
Alex | In reply to @misuzu:matrix.org Nope, tried 375000, 750000 and 1500000, still 500000 I suspect your version of u-boot is lacking a patch needed to support it. | 19:58:30 |
misuzu | Yeah, that's probably it | 19:59:14 |
| 9 Jul 2023 |
| @jkachmar:matrix.org joined the room. | 03:19:50 |
Pratham Patel | In reply to @alex:tunstall.xyz I was on upstream 6.4.0 (from commit 4964ce0a869e) when I wrote that. I assume from your repository that this behaviour is from a build of e5a381c51d624ffd8784db908a58ae227d0608a4? by upstream, do you mean StarFive's repo or Linus' tree? I belive Linus' tree is missing support for the eMMC node for the VF2 dtsi (haven't checked for -next). | 11:14:28 |
Alex | In reply to @thefossguy:matrix.org by upstream, do you mean StarFive's repo or Linus' tree? I belive Linus' tree is missing support for the eMMC node for the VF2 dtsi (haven't checked for -next). Vendor's, sorry I was unclear (I'd call Linus' mainline). | 11:15:32 |
Alex | FWIW I tried mainline too but it didn't boot and I don't have the hardware to debug failed boots. | 11:16:26 |
Pratham Patel | Ah okay... I tried their 6.4-rc3 with my old arch image a few months ago... It would boot but the GPU drivers are tied to the vendor 5.15.0 kernel for now :( | 11:17:08 |
Pratham Patel | In reply to @alex:tunstall.xyz FWIW I tried mainline too but it didn't boot and I don't have the hardware to debug failed boots. Yeah, the mainline kernel doesn't know where the SD card is. I checked it via UART and it panicked at a recovery shell with a missing rootfs. Dug deeper to find out that the upstream DTB doesn't yet have an "entry" for the eMMC node. | 11:18:21 |
Pratham Patel | Vendor kernel has this node: https://github.com/starfive-tech/linux/blob/b4920a1a3dd328124c61b07e8a6ab48c67881037/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi#L23 | 11:21:02 |
Pratham Patel | Meanwhile upstream doesn't yet have it: https://github.com/torvalds/linux/blob/e2c510d6d630fe6593a0cf87531913b4b08ebeb1/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi#L18 | 11:21:33 |
Alex | For microSD, mmc1 is the correct node btw. I don't think mmc0 is used in the VF2, but it seems like it's for eMMC.
[nixos@nixos:/etc/nixos]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk1 179:0 0 232.2G 0 disk
├─mmcblk1p1 179:1 0 256M 0 part /boot
└─mmcblk1p2 179:2 0 231.9G 0 part /nix/store
/
| 11:22:27 |
Pratham Patel | Yes, but both are missing from upstream ;) | 11:23:22 |
Alex | Oh dear, no ethernet in mainline either | 11:23:29 |
Pratham Patel | :') | 11:23:47 |
| 10 Jul 2023 |
trofi | artemis: RE your past problems with libtool cross-compiling on Gentoo. I think I found the issue: if you run nix itself in a containerized environment nix silently falls back into the mode without a sandbox enabled (due to a sandbox-fallback = true) and happily runs unsandboxed builds in /tmp. ALl the bianries in /usr/bin and whatnot are available to the builds and this impurity contaminates the environemtn with /usr/lib library search paths breaks the builds.
The easy way to check it is to set sandbox-fallback = false in /etc/nix/nix.conf, restart nix-daemon and try to build something. If it fails that means you have been using unsandboxed builds.
| 08:32:39 |