Skip to content
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

*: riscv fixes/changes #168826

Merged
merged 3 commits into from
Nov 25, 2022
Merged

*: riscv fixes/changes #168826

merged 3 commits into from
Nov 25, 2022

Conversation

Madouura
Copy link
Contributor

@Madouura Madouura commented Apr 15, 2022

Description of changes

Add support for the RISC-V StarFive VisionFive SoC.
Sections of this taken from https://github.com/zhaofengli/nixos-riscv64.

Current goal(s)

  • Fix known upstream bugs in other issues/PRs

Past goal(s)

  • Be able to build a basic NixOS system for riscv64-linux and have it run on VisionFive hardware

Past related issue(s)

Things done
  • Built on platform(s)
    • x86_64-linux cross to riscv64-linux
    • aarch64-linux
    • riscv64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: kernel The Linux kernel 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Apr 15, 2022
@Madouura Madouura force-pushed the dev/linux-riscv branch 2 times, most recently from a76c91f to 21bb635 Compare April 15, 2022 20:34
@Madouura
Copy link
Contributor Author

The sd-image changes may be able to be genericized if multiple other systems also use a similar sdcard layout.

@Madouura Madouura mentioned this pull request Apr 15, 2022
@Madouura
Copy link
Contributor Author

Would have liked to use the starfive linux fork as a patch on top of our kernel instead, but it would always fail at the patch stage, so instead using it verbatim for now.

@colemickens
Copy link
Member

cc: @zhaofengli

@Madouura
Copy link
Contributor Author

...Now that I think about it, should probably be targeting staging as this is a HUGE rebuild for hydra lol.

@Madouura Madouura changed the base branch from master to staging April 16, 2022 00:01
@Madouura
Copy link
Contributor Author

Madouura commented Apr 16, 2022

Should also mention I'm holding off on release notes until everything is properly building and I can test it on my hardware.
Currently, with an iso.nix (such as below) and nix-build nixos -A config.system.build.sdImage -I nixos-config=iso.nix at the nixpkgs root directory, it does build and generate an image (zst).

{ config, ... }:

{
  imports = [ "/home/mado/Documents/Development/nixpkgs/nixos/modules/installer/sd-card/sd-image-riscv64-visionfive-installer.nix" ];

  nixpkgs.crossSystem = {
    config = "riscv64-unknown-linux-gnu";
    system = "riscv64-linux";
  };
}

Edit: config.allowUnsupportedSystem = true; not needed.

@ofborg ofborg bot removed the 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild label Oct 7, 2022
@ofborg ofborg bot requested a review from edolstra October 7, 2022 18:21
@github-actions github-actions bot removed 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: kernel The Linux kernel 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Oct 8, 2022
@Madouura Madouura changed the title linux_visionfive: init at 5.18.5 *: riscv fixes/changes Oct 8, 2022
@Madouura
Copy link
Contributor Author

Madouura commented Oct 8, 2022

Moved mostly everything to NixOS/nixos-hardware#479

@Madouura
Copy link
Contributor Author

Madouura commented Nov 4, 2022

Are we good for merge?

@SuperSandro2000
Copy link
Member

@astro FYI

@Madouura
Copy link
Contributor Author

Assuming the nlohmann_json change is okay, we should be good for merge.

@SuperSandro2000
Copy link
Member

@ofborg build nix

Merging when nix still builds on the major platforms.

@SuperSandro2000 SuperSandro2000 merged commit e62efc6 into NixOS:master Nov 25, 2022
@Madouura Madouura deleted the dev/linux-riscv branch November 25, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.