-
-
Notifications
You must be signed in to change notification settings - Fork 630
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 #964
Conversation
Also please apply: --- a/starfive/visionfive/v2/default.nix
+++ b/starfive/visionfive/v2/default.nix
@@ -8,8 +8,7 @@
inherit (config.boot) kernelPatches;
});
- kernelParams =
- lib.mkDefault [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ];
+ kernelParams = [ "console=tty0" "console=ttyS0,115200n8" "earlycon=sbi" ];
initrd.availableKernelModules = [ "dw_mmc_starfive" ]; Otherwise these kernelParams are overridden by boot.consoleLogLevel. This is why we were not seeing any output on mainline kernel. |
It's working! https://hydra.nichi.co/build/3702 Tested ethernet. USB and PCI-E doesn't seem to work. |
Current state of the PR is also booting for me :) |
I'd prefer fixing the kernel config once and for all :) |
This mainline kernel is also running for nearly a day (except for a short power outage due to flooding). |
33e760f
to
56039df
Compare
@NickCao incooperated your change requests, still seems to boot fine for me :) |
need to figure out how to enable USB support |
@NickCao There's an efi_loader improvement patch up for review that enables EFI-configured (and U-Boot environment variable as fallback) devicetree loading with EFI boot manager (but not global USB host mode broke with the change in devicetree verbiage after Linux Kernel 6.1.x; Slap the devicetree from whatever Linux 5.15 vendor kernel into 6.1.x with an appropriate kernel config and you'll have working USB as a baseline to figure out what changed with the new devicetree verbiage of later kernel releases. |
I think this removes the need to keep u-boot updated (for updated dtb)?
We can have a board specific "firmware updater" and go for the SPL in SPI flash route. And
I'm also leaning towards that.
That's a valid concern, I see no good solution to this.
I believe it's working with the 6.6 branch we were using. |
I added
and tried the new kernel, still no output in this is the dmesg output
I guess the drivers for PCI support are still missing in kernel 6.9? does USB requires working PCI(e) support? Will it be included in Kernel 6.10? https://patchwork.kernel.org/project/linux-riscv/cover/[email protected]/ |
I will see if I can get this to work.
This is twofold:
So far, the kernel.org upstream kernel does not have the PLDA PCIe controller merged yet. |
@orangecms Oh good hint, thank you! So I added:
but still nothing in But some interesting debug stuff
|
Rebase with: PCI: starfive: Add JH7110 PCIe controller https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=controller/microchip This is most of the PCIe host series less patch 22/22 riscv: dts: starfive: add PCIe dts configuration for JH7110. Apply and resolve conflicts as the filenames have changed with the reorganization. Also apply or use as a reference this series for the Kconfig options: v3-riscv-defconfig-Enable-StarFive-JH7110-drivers.patch https://patchwork.kernel.org/project/linux-riscv/list/?series=858940 Not sure about USB yet. I'm reading others' work and did some testing of my own, it does not seem complicated only that StarFive developers had zero motivation to update the documentation and test USB host mode on Linux kernel releases with the new devicetree verbiage as the VisionFive2 product only has this connected on the USB-C port which is used primarily for power and gadget mode. It does not make sense to use that for host mode when they have a VL805 hanging on the PCIe bus which is more capable for USB and is working in upstream. Edit: Note there's some merge conflicts if you want to follow along. Updated build instructions for 6.10.0-rc3* at that one issue I abuse the Update comment button on frequently |
Just to have a better understanding: Is usb the remaining topic that needs fixing for this branch, or is it also planned to backport some upstream patches to get feature parity with the current vendored kernel. E.g. pcie seems to be supported earliest with upstream 6.11 |
usb would be a requirement for me. in case it is possible to backport some patches that would be nice |
0d672e0
to
0cf4b17
Compare
6.11-rc7 seems to fix this issue. |
I can also build
The kernel logs spit out these kinds of messages:
|
In my experience this MMC full buffer error happens with Linux Kernel that is running with devicetree data of internal U-Boot firmware device tree instead of the devicetree for that Linux Kernel. Troubleshooting MMC buffer errors in kernel log for JH7110 board:
|
a60f705
to
c4f46cc
Compare
updated the pull request. the stable kernel release works fine for me, was able to build bcachefs-tools and mount an encrypted external drive :) |
So can we bump this kernel version or do we have to wait? |
1fdb032
to
dc0b5fb
Compare
should be fixed now :) |
As an aside, the Debian environment I'm familiar has the following kernel boot cmdline from GRUB2:
There is none of that earlycon tty tty0 which seems to be copy-paste from the vendor Linux and U-Boot. |
Booting from NVME worked after adding:
Do we need all modules in initrd? |
0525646
to
4131a65
Compare
It won't hurt if usb/nvme booting all works out of the box. |
@Mic92 are we supposed to update the |
You can update here and merge if you are ready. |
4131a65
to
93ea82a
Compare
Co-authored-by: NickCao <[email protected]>
93ea82a
to
230536c
Compare
Thanks, tested it and it still works fine for me 👍 |
Tested booting from usb, and htop works! |
Also booting from card works, remote builds also work, and btop works! |
Description of changes
Depends on, which is not yet backported to 24.05 NixOS/nixpkgs#316724
Things done
nixos-hardware
andimporting it via
<nixos-hardware>
or Flake input