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

pine64-pinebook-pro: improvements and simplifications #743

Merged
merged 5 commits into from
Oct 11, 2023

Conversation

tomfitzhenry
Copy link
Contributor

@tomfitzhenry tomfitzhenry commented Sep 28, 2023

Description of changes

Improvements to the Pine64 Pinebook Pro config:

  • Support boot-from-NVMe
  • Remove quirks that have been upstreamed.
  • Remove ap6526-firmware. Upstream (linux-firmware) has WiFI drivers.

See commit messages for more details.

I have been running this config for >6 months.

Things done
  • Tested the changes in your own NixOS Configuration
  • Tested the changes end-to-end by using your fork of nixos-hardware and
    importing it via <nixos-hardware> or Flake input

@tomfitzhenry tomfitzhenry changed the title Pinebook pro pine64-pinebook-pro: improvements and simplifications Sep 28, 2023
@samueldr
Copy link
Member

Looks plausibly okay from just reading the diff. (I haven't been using mine for much other than Tow-Boot dev...)

So tentatively half-approved, because it sure looks like it's fine.

tomfitzhenry added a commit to tomfitzhenry/nixos-hardware that referenced this pull request Sep 29, 2023
Mic92 pushed a commit that referenced this pull request Oct 1, 2023
Prior contributions:

* #444
* #445
* #446

Pending contributions:

* #743
@@ -8,6 +8,10 @@

boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;

boot.kernelParams = [
"console=tty0"
Copy link
Member

Choose a reason for hiding this comment

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

@samueldr what is your opinion on this?

Related: #745 (comment)

Copy link
Member

@Mic92 Mic92 Oct 6, 2023

Choose a reason for hiding this comment

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

I guess by default it will try some serial device instead, which is not so nice for a laptop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will move this PR into draft state until I understand the subtleties of setting console=.

Copy link
Member

Choose a reason for hiding this comment

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

I have some understanding of the option in case you have questions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/serial-console.rst was instructive to me, and systemd/systemd#9899 re systemd's relationship to console=.

I think it's better if console= is not set, on the basis that:

  • users might not want the bootlog on their display
  • the right-most console= directive is semantically important (its used as /dev/console), and so overriding becomes trickier.

How does that sound? I have removed that commit from the PR.

Copy link
Member

Choose a reason for hiding this comment

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

I think I misspoke in the previous comment in what I think the best option is for this.

A default might be right, and it would depend on the device type.

We can't rely on the "unconfigured default", since in DT-land Linux defaults it relies on /chosen/stdout-path, which sometimes doesn't make sense given a target:

https://github.com/torvalds/linux/blob/1c8b86a3799f7e5be903c3f49fcdaee29fd385b5/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts#L28-L30

But setting console= without qualifying it is kinda rude as it prevents the user from "simply" choosing another one.

So the workaround (with our semantics) is to put it at the leftmost location. In other words:

boot.kernelParams = mkBefore [ "console=tty0" ];

This would be for devices we can ascertain that most users would expect a given default console choice.

@tomfitzhenry tomfitzhenry marked this pull request as draft October 9, 2023 05:42
I have been running for >1 year with the upstream linux-firmware
package (i.e. just hardware.enableRedistributableFirmware = true)

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/WHENCE#n2767
@tomfitzhenry tomfitzhenry marked this pull request as ready for review October 10, 2023 16:08
@Mic92
Copy link
Member

Mic92 commented Oct 11, 2023

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Oct 11, 2023

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at d6b554a

@mergify mergify bot merged commit d6b554a into NixOS:master Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants