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

nixos/hardware.deviceTree: Allow use of dtmerge #67989

Closed
wants to merge 5 commits into from

Conversation

kwohlfahrt
Copy link
Contributor

@kwohlfahrt kwohlfahrt commented Sep 3, 2019

Some raspberry pi overlays don't build with fdtoverlay (raspberrypi/linux/issues/3198). Also, dtmerge supports setting overlay parameters. However, dtmerge is only available on ARM, so we can't use it everywhere, hence adding the option to select which tool to use for combining device trees.

This also modifies the format of the overlays option to accept both an overlay path and an optional list of parameters, though the latter must be empty for the dtc builder.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @samueldr

Some raspberry pi overlays don't build with fdtoverlay
(github.com/raspberrypi/linux/issues/3198). Also, dtmerge supports
setting overlay parameters.

However, dtmerge is only available on ARM, so we can't use it
everywhere.
These device trees are incompatible with the mainline kernel, as well as
linux_rpi. linux_rpi now bundles its own device-tree files and overlays,
so there is no use for these anymore.
device-tree.
'';
example = literalExample "[\"\${pkgs.linuxPackages_rpi.kernel}/dtbs/overlays/w1-gpio.dtbo\"]";
};
Copy link
Member

Choose a reason for hiding this comment

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

Looks like linuxPackages_rpi is no more and you need to say which one e.g. linuxPackages_rpi4

@disassembler disassembler modified the milestones: 20.03, 20.09 Feb 5, 2020
@sorki sorki mentioned this pull request Feb 6, 2020
10 tasks
@kwohlfahrt
Copy link
Contributor Author

Closing this in favour of #79370

@kwohlfahrt kwohlfahrt closed this Apr 1, 2020
@kwohlfahrt kwohlfahrt deleted the device-tree-dtmerge branch June 5, 2020 10:27
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/cross-compiling-problem-with-devicetree-on-armv6/9254/5

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.

None yet

5 participants