!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

222 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux https://github.com/orgs/NixOS/teams/risc-v64 Servers

Load older messages


SenderMessageTime
24 Mar 2024
@darkwater4213:matrix.orgdarkwater4213Awww22:01:05
@darkwater4213:matrix.orgdarkwater4213Well, what does make things interesting22:01:26
25 Mar 2024
@root:0x1.stroot joined the room.13:49:18
@sorear:matrix.orgsorearI have a riscv-specific kernel patch that I want to test in a full OS environment (prior tests have been musl+busybox in an initramfs) and a nixos x86_64 host/build machine. Is there an easy way to use nix to cross compile (from x86_64-linux to riscv64-linux) a kernel and rootfs suitable for booting NixOS in QEMU? I don't want to manually determine the correct kernel configuration options, and being able to tweak things in userspace would be useful for future tests. I do not have an encyclopedic knowledge of nixos internals or non-QEMU hardware.15:52:37
@thefossguy:matrix.orgPratham PatelThere is one afaik but I can't point you to it since imho, it is better to not deal with this and buy a VF2 instead, since it is quite cheap and unlike a RPi, has an M.2 2280 slot for an NVMe.15:54:04
@sorear:matrix.orgsorearthe last piece of hw I ordered from China in July still hasn't shipped, and even if I reorder it I want to do this project now, not in 2 months15:55:16
@thefossguy:matrix.orgPratham PatelEven India (a country were getting such niche SBCs is close to impossible) has this available for purchase and shipping under 2 days, max.15:57:12
@sorear:matrix.orgsorearis there a technical reason to gatekeep qemu users from nixos?15:57:27
@thefossguy:matrix.orgPratham PatelNot sure, I just find it easier to not deal with it, that's all 😅15:57:54
@sorear:matrix.orgsorearis there anyone who is willing to answer?15:59:34
@thefossguy:matrix.orgPratham PatelRedacted or Malformed Event16:00:33
@thefossguy:matrix.orgPratham Patel

sorear: you can try building the sd-image for the VF2 and override the kernel with your source + any additional patches. If I were to do something like what you described, I'd start from here.

https://nixos.wiki/wiki/NixOS_on_RISCV/VisionFive_2

16:05:55
@sorear:matrix.orgsorearI still cannot make heads from tails of anything flakes-related16:06:57
* @thefossguy:matrix.orgPratham Patel will be back with a tested flake.nix that sorear can reproduce16:08:43
@sorear:matrix.orgsorearcan I ask you questions about what any given thing in a flake does?16:11:31
@thefossguy:matrix.orgPratham Patelstumbled across this: https://github.com/NixOS/nixpkgs/pull/12545116:11:32
@thefossguy:matrix.orgPratham PatelI don't understand it well enough but sure, do ask me! I'll try to answer if I understand :)16:12:06
@sorear:matrix.orgsorearif you think the directions you just gave me are intelligible, you understand it much better than i do16:12:44
@thefossguy:matrix.orgPratham PatelDo ask then :)16:13:39
@root:0x1.strootI have a working setup based on this with custom uboot and kernel for real hw, also a working qemu setup for userspace testing16:14:56
@root:0x1.strootC908 w/ RVV 1.0. Working on new kernel at the moment.16:16:53
@thefossguy:matrix.orgPratham Patel
In reply to @sorear:matrix.org
I still cannot make heads from tails of anything flakes-related
Okay this might be helpful if you don't understand flakes... Use this to understand how you can cross compile an armv7l sd-image from any host arch, but do it for riscv64. Then, replace sd-image-aarch64.nix with sd-image-riscv64-qemu.nix.
16:17:07
@sorear:matrix.orgsorear
In reply to @thefossguy:matrix.org
Okay this might be helpful if you don't understand flakes... Use this to understand how you can cross compile an armv7l sd-image from any host arch, but do it for riscv64. Then, replace sd-image-aarch64.nix with sd-image-riscv64-qemu.nix.
this looks very helpful, it was extremely unclear from the nixos manual whether it was possible to override anything in the standard configurations
16:22:04
@sorear:matrix.orgsorear
In reply to @root:0x1.st
I have a working setup based on this with custom uboot and kernel for real hw, also a working qemu setup for userspace testing
I may ask about this later if any of it is nontrivial for nix-language or nixpkgs reasons
16:22:50
@thefossguy:matrix.orgPratham Patelfyi, I may not reply after a few hours since it's 22:00 here; will reply to your questions (if any) in the morning16:23:22
@joerg:thalheim.ioMic92 Steven Keuchel: Another question. One can download the edk2 firmware from here: https://github.com/sophgo/sophgo-edk2/actions/runs/8262095841 18:07:08
@joerg:thalheim.ioMic92Does it matter which device tree file I download that is mentioned here? https://github.com/sophgo/sophgo-edk218:07:31
@joerg:thalheim.ioMic92I mean what version of mango-milkv-pioneer.dtb I use?18:07:42
@joerg:thalheim.ioMic92Does this need to match up with the Linux kernel or is this used by the efi firmware?18:08:28
@alex:tunstall.xyzAlex
In reply to @joerg:thalheim.io
Does this need to match up with the Linux kernel or is this used by the efi firmware?
The Linux kernel tree has its own DTBs, but IIRC it can use the DTB provided by EFI, so doesn't it depend on what parameters you're passing the kernel?
20:26:04

Show newer messages


Back to Room ListRoom Version: 10