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

lib.systems.riscv-multiplatform: linux-kernel config improvements #316724

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

NickCao
Copy link
Member

@NickCao NickCao commented Jun 2, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Like aarch64, riscv platforms require many drivers to be builtin to boot.
SERIAL_OF_PLATFORM has been y in riscv defconfig since 2018

Reference: torvalds/linux@33c57c0
@github-actions github-actions bot added the 6.topic: lib The Nixpkgs function library label Jun 2, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 labels Jun 2, 2024
@onny
Copy link
Contributor

onny commented Jun 3, 2024

What does preferBuiltin = true; mean? Why dropping

extraConfig = ''
  SERIAL_OF_PLATFORM y
'';

@NickCao
Copy link
Member Author

NickCao commented Jun 3, 2024

What does preferBuiltin = true; mean?

Even if a kconfig option defaults to y, if preferBuiltin is not set and m is available as an option, m would be set.

Why dropping

extraConfig = ''
  SERIAL_OF_PLATFORM y
'';

It's part of the defconfig since 2018.

@onny onny self-requested a review June 3, 2024 17:38
Copy link
Contributor

@onny onny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, works for me on VisionFive2 board without manually force PINCTRL_STARFIVE_JH7110_SYS = yes;. Kernel is booting fine 👍

@NickCao
Copy link
Member Author

NickCao commented Jun 3, 2024

@onny Do you know who else is working on riscv? I'd like to ping more people before merging such a potentially breaking change.

@onny
Copy link
Contributor

onny commented Jun 3, 2024

Unfortunately not. We should create a platform maintainer group :)

@NickCao
Copy link
Member Author

NickCao commented Jun 3, 2024

Unfortunately not. We should create a platform maintainer group :)

There is @NixOS/exotic-platform-maintainers

@0x4A6F
Copy link
Member

0x4A6F commented Jun 3, 2024

There is also #riscv:nixos.org which is scoped to RISC-V topic.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jun 4, 2024
@onny onny requested review from Madouura and fgaz June 4, 2024 18:41
@onny
Copy link
Contributor

onny commented Jun 18, 2024

Are we save merging this or do we need some more tests?

@NickCao
Copy link
Member Author

NickCao commented Jun 18, 2024

Are we save merging this or do we need some more tests?

Let's merge this, it should be a net profit for the riscv platform. Except for these really memory constrained devices that can benefit from a smaller kernel, but they should be using a trimmed down kernel config anyway.

@NickCao NickCao merged commit febff2f into NixOS:master Jun 18, 2024
25 checks passed
@NickCao NickCao deleted the riscv-builtin branch June 18, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: lib The Nixpkgs function library 6.topic: riscv64 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants