Closed mcdonc closed 8 months ago
I made stage 2 boot work automatically by adding
populateRootCommands = ''
cp ${config.system.build.toplevel}/init files/init
'';
to the sdImage
attrset.
This seems needless but it does work :)
FYI, Nick, I made a video pimping your work at https://www.youtube.com/watch?v=-ydXjEWUlGE
EDIT: I solved the automatic boot problem described here in a hacky way, see https://github.com/NickCao/nixos-riscv/pull/14#issuecomment-1945544836
Currently the Duo 256M boots but not automatically. It gets through stage 1 and then fails to find /mnt-root/init when it tries to start stage 2 (see https://github.com/NickCao/nixos-riscv/issues/12). But if I stop the boot, and change the boot args to point it at the right nixos system stage 2 init in the nix store, stage 2 completes and the system comes up.
I'm wondering if anyone has any suggestions about what to change to make it boot automatically (mabe Nick)? It seems to be related to https://github.com/NixOS/nixpkgs/blob/release-23.11/nixos/modules/system/boot/stage-2.nix#L79 but I'm not sure why that would need to be different than the Duo 64.
Here's the boot console log for a successful boot (note me stopping the boot and changing the boot args)
Although the transcript shows swap not working, a later commit fixed this.