nickcao / nixos-riscv Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi Nick,
I'm trying to bring up the new-ish Milk V Duo 256M board (https://github.com/mcdonc/nixos-riscv/tree/duo-256), and I've got it booting up to this point:
starting device mapper and LVM...
[ 3.428080] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] loadkmap: can't open console
[ 3.437372] random: lvm: uninitialized urandom read (4 bytes read)
[ 3.455223] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] starting device mapper and LVM...
Failed to set up async io, using sync io.
[ 3.481599] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] Failed to set up async io, using sync io.
checking /dev/disk/by-label/NIXOS_SD...
fsck (busybox 1.36.1)
[fsck.ext4 (1) -- /mnt-root/] [ 3.586874] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] checking /dev/disk/by-label/NIXOS_SD...
fsck.ext4 -a /dev/disk/by-label/NIXOS_SD
[ 3.614804] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] fsck (busybox 1.36.1)
NIXOS_SD: recovering journal
[ 3.629519] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] [fsck.ext4 (1) -- /mnt-root/] fsck.ext4 -a /dev/disk/by-label/NIXOS_SD
[ 3.649845] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] NIXOS_SD: recovering journal
NIXOS_SD: clean, 47600/59904 files, 223233/231966 blocks
[ 3.676827] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] NIXOS_SD: clean, 47600/59904 files, 223233/231966 blocks
mounting /dev/disk/by-label/NIXOS_SD on /...
[ 3.706598] stage-1-init: [Thu Jan 1 00:00:03 UTC 1970] mounting /dev/disk/by-label/NIXOS_SD on /...
[ 3.721891] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 3.735810] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
stage 2 init script (/mnt-root//init) not found
An error occurred in stage 1 of the boot process, which must mount the
root filesystem on `/mnt-root' and then start stage 2. Press one
of the following keys:
r) to reboot immediately
*) to ignore the error and continue
I'd like to add various kernel flags to do some debugging, but changing boot.kernelParams
of my duo-256.nix (a copy of your duo.nix with various changes to support the 256) seems to have no effect. I always end up with this set of flags passed down to the kernel:
Kernel command line: root=/dev/mmcblk0p2 rootwait rw console=ttyS0,115200 earlycon=sbi riscv.fwsz=0x80000 loglevel=9
These seem like they'd be coming from kernelParams, but adding one does not change the command line reported by the kernel.
I've generated an appropriate .dts for the board by running the buildroot, but the flags aren't in there or the associated .dtb either.
I'm a U-Boot noob I fear. Is there a way to add flags manually in the U-Boot CLI maybe for only the current boot?
hey @NickCao -- I've been checking out your work, and I can see end0 and end1 come up, but I'm not getting any connectivity. known issue?
I've recently acquired a Milk-V Duo (64M), which I am interested on putting NixOS on. According to #10, the board is supported but the flashed sd image does not seem to be recognized by the board, nor by dmesg and thus I cannot ssh into it.
What could it be that I'm missing?
I noticed you forked nixos-hardware
. I am curious if you're trying to build the july RC of u-boot for starfive2? I would prefer to use it over the starfive fork. Figured I'd ask instead of potentially duplicating efforts.
It seems like the build process around the opensbi/dynamic_fw.img is a bit changed, I haven't quite gotten it all building yet.
Some command line logs and dmesg:
[root@nixos-duo:/run/booted-system/kernel-modules/lib/modules/5.10.4/kernel]# insmod drivers/video/fbdev/core/cfbimgblt.ko
insmod: ERROR: could not insert module drivers/video/fbdev/core/cfbimgblt.ko: Invalid parameters
[root@nixos-duo:/run/booted-system/kernel-modules/lib/modules/5.10.4/kernel]# insmod drivers/usb/gadget/udc/dummy_hcd.ko
insmod: ERROR: could not insert module drivers/usb/gadget/udc/dummy_hcd.ko: Invalid parameters
[root@nixos-duo:/run/booted-system/kernel-modules/lib/modules/5.10.4/kernel]# insmod fs/efivarfs/efivarfs.ko
insmod: ERROR: could not insert module fs/efivarfs/efivarfs.ko: Invalid parameters
[ 158.615833] cfbimgblt: bad vermagic: kernel tainted.
[ 158.621547] Disabling lock debugging due to kernel taint
[ 158.628478] cfbimgblt: Unknown relocation type 57
[ 190.230200] dummy_hcd: Unknown relocation type 57
[ 190.230200] dummy_hcd: Unknown relocation type 57
[ 202.449099] efivarfs: Unknown relocation type 57
[ 202.449099] efivarfs: Unknown relocation type 57
Lately I've been working with the Milk-V Duo, which is a low-cost Pico-sized SBC with some solid capabilities. The current build system uses Buildroot as well as some other tools to build a custom image. The only real problem with this system is it's only effective if you clean out the repository and clone it again. Do you think that it would be feasible and more effective to port NixOS to the Duo as opposed to using the Buildroot system?
Hi!
Thanks for this resource.
Just wanted to point this out: StarFive VisionFive 2 SBC Now Supports TianoCore EDK II (UEFI) (rvspace.org)
I'm not sure how hard it would be to use nixpkgs's edk2 infra to build this, but I thought you might find it interesting, or worth packaging.
the fcff4f7 introduced a bug witch result in:
error: anonymous function at /nix/store/5c6y44wg6vpp0r6kpxl4c2abmrwm4b1q-source/starfive/visionfive/v2/opensbi.nix:1:1 called with unexpected argument 'withPayload'
at /nix/store/wvms094v8gmkff7wfs05p1zmzdvzc4mk-source/lib/customisation.nix:74:16:
73| let
74| result = f origArgs;
| ^
75|
(use '--show-trace' to show detailed location information)
Does it make sense to have the u-boot visionfive2 package generate and output the visionfive2_fw_payload.img
file?
This is what the user guide uses for upgrading u-boot in place, which is my goal.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.