-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
OLIMEX Teres-I: Init #750
OLIMEX Teres-I: Init #750
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ config, lib, pkgs, ...}: | ||
|
||
{ | ||
hardware.deviceTree = { | ||
name = lib.mkDefault "allwinner/sun50i-a64-teres-i.dts"; | ||
enable = lib.mkDefault true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
in my tests it was sometimes using the sun50i-a64.dtsi so this is an attempt to mitigate that behavior (also observed on armbian). It doesn't seem to be using the DTB if Additionally i tested other kernels and they don't seem to work correctly if this is set so expecting the user to use the mainline, ideally it should have an option for linux-libre, but that seems to need an upstream changes to work correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It simply can't be zero. It's either So There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. misspoke about the zero meant I do more tests on this and get back to you |
||
}; | ||
|
||
boot = { | ||
consoleLogLevel = lib.mkDefault 7; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why change the default console log level? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Other boards seems to change that so it's an attempt to follow the coding standard |
||
|
||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; | ||
kernelParams = lib.mkDefault ["console=ttyS0,115200n8"]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will make serial the main way of seeing boot logs (other ttys will only see a getty later on). Is this the preferred way to access it? Does the board have other means like HDMI output that might be used? I.e. if someone doesn't have a serial adapter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also see #745 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
it has micro-hdmi and eDP both of which seem to show the full initialization of the OS. Serial adapter is essential to be able to use the system as far as i know every teres user has one.
Afaik it's not relevant, the initialization of rockchip differs from sunxi. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allwinner and Rockchip are both irrelevant here. It's a kernel feature. The reason this "works" is because this is a no-op, functionally speaking.
|
||
extraModulePackages = lib.mkDefault []; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This likely does nothing. See previous comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. boot.kernelPackages defaults to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a fundamental misunderstanding of how the modules system work in here.
Here's a quick proof, this is evaluating a bare entirely unconfigured system, with your "configuration.nix" being only what is in the
You will see that it will never end-up being used, as the moment anything sets Doing so for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested both through my config and sourcing the fork, but i didn't notice different behavior i will investigate and get back to you |
||
|
||
initrd = { | ||
availableKernelModules = lib.mkDefault ["usbhid"]; | ||
kernelModules = lib.mkDefault []; | ||
Comment on lines
+17
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These likely do nothing. See previous comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Link "the previous comment" next time, it makes it hard to follow plz. Assuming you meant this one: #750 (comment)
the unsets for empty lists are an attempt to highlight to the end-user that these are relevant for hardware modifications (very common practice among teres users) and to keep them empty by default. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
See this comment. TLDR: it won't do anything as those are set with higher priority. Setting any list with |
||
}; | ||
|
||
loader = { | ||
grub.enable = lib.mkDefault false; | ||
generic-extlinux-compatible.enable = lib.mkDefault true; | ||
}; | ||
}; | ||
|
||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; | ||
|
||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed, as it is used to pick a different
dtb
filename from the default in the extlinux-compatible boot flow.Setting it could (but probably won't) break things as it would not naturally change if the platform firmware + kernel pairing of DTB filenames change for the board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See rationale in #750 (comment)
tldr: it's needed as the bootloader likes to sometimes prefer generic a64 sunxi dtb over the one specific to teres
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only mainline U-Boot is aimed to be supported, unless specified otherwise.
Mainline U-Boot will use the appropriate dtb filename here.
If it does not, you are not using mainline U-Boot, or have it misconfigured. (There is the unlikely possibility of a bug upstream, but if it did, every board at least using the same SoC would be broken, if not all boards using a dtb).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do more tests on this and get back to you