-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
starfive visionfive2: use mainline kernel #958
Conversation
Oh wow, the upstream support seems to be quite advanced. Does that mean that with the latest kernel 6.9 in Nixpkgs https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/kernels-org.json we can expect a normal installation to just work? Even booting from an NVMe PCIe ssd? |
I think so, except that display/camera won't be working. |
I have just tried the following setup with {
inputs.nixos-hardware-visionfive2.url = "github:NickCao/nixos-hardware/visionfive2-mainline";
inputs.nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
outputs =
inputs@{ self
, nixos-hardware-visionfive2
, nixpkgs-unstable
, ...
}: {
nixosConfigurations.visionfive2 = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixos-hardware-visionfive2}/starfive/visionfive/v2/sd-image-installer.nix"
({ pkgs, ... }: {
nixpkgs.crossSystem = {
config = "riscv64-unknown-linux-gnu";
system = "riscv64-linux";
};
# needed for 8GB RAM model
hardware.deviceTree.overlays = [{
name = "8GB-patch";
dtsFile = "${nixos-hardware-visionfive2}/starfive/visionfive/v2/8gb-patch.dts";
}];
sdImage.compressImage = false;
system.stateVersion = "23.11";
})
];
};
};
} To build it run As expected (i think) i see nothing through HDMI, but the green LED on the board, which appears with the custom Visionfive 2 Debian, doesn't light up; i only see the red LED. So i guess NixOS is not booting. I will try the current NixOS-hardware setup with the custom Starfive Linux kernel. edit: Do i need to update the firmware first? E.g. use the current NixOS or Visionfive Debian, flash the firmware, and then boot with the normal latest upstream kernel? I have set the boot mode pins to SDIO (to boot from SD card i think), but maybe i have to set it to QSPI |
Oh wow, the current NixOS-hardware setup with the custom kernel doesn't show any HDMI output, doesn't show a green LED, but is reachable through ethernet with |
@NickCao This PR doesn't seem to boot. I can't even reach it through ethernet. Could it be something with u-boot that needs manual typing in something? I wouldn't be able to, because there's no HDMI output and i don't have any USB serial adapter or anything. |
I'm not sure, don't have access to the board now. Let's keep this as a draft and revisit later. |
Alright. Do you have any suggestion what i could try in the mean time? |
Play with the kernel config? Very likely defconfig is missing a bunch of required drivers. |
have you checked UART/serial output of your board? https://wiki.nixos.org/wiki/NixOS_on_RISCV/VisionFive_2#Usage would be nice to see the failure log why the board fails to boot |
@onny Unfortunately, i don't have a device to connect UART/serial. Would you be able to test it out? |
can you please update the snippet, I'm unable to build it because of syntax errors. which build command did you use? |
Should build now with |
@misuzu Would you know how to apply this patch to @NickCao's PR or bump the nixpkgs latest kernel version? My kernel knowlege is quite limited xD i'd be happy to try it out then. |
A cross compiled sd image is available at https://hydra.nichi.co/job/nixos/riscv/visionfive2 |
Since the current vendor kernel doesn't have working HDMI either. I think we are not losing functionality? |
@NickCao
Still works after reboot. Anything else i should check? |
That's all. |
This reverts commit 87e3122.
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at a44ddc2 |
for me it fails to boot, stuck at this point i tried this image https://hydra.nichi.co/build/3383 maybe it was the older one missing the fixes? |
For me it is also stuck:
|
Does it ping? Maybe Ethernet is working but serial is not. |
No, doesn't ping. |
Could you check if the |
Oh oh. I used an older nixos-hardware commit by mistake. I just checked the Linux kernel
I'm deeply sorry. It's the Starfive custom kernel :( I will check if the just the last |
Description of changes
See https://rvspace.org/en/project/JH7110_Upstream_Plan for support status.
Things done
nixos-hardware
andimporting it via
<nixos-hardware>
or Flake input