[Nix-dev] Customizing kernel options and thoroughly failing.

Matthew Robbetts wingfeathera at gmail.com
Sun Jul 24 00:18:04 CEST 2016


> On Jul 23, 2016, at 3:14 PM, Shea Levy <shea at shealevy.com> wrote:
> 
> Hi Matt,
> 
> I'm not sure off the top of my head how to get this working with the
> nixpkgs extraConfig mechanism, but as an alternative if you generate
> your own .config file (e.g. by copying the one from a running NixOS
> system and using menuconfig in a kernel checkout to add the options you
> want) then you can use the `buildLinux` function in nixpkgs directly
> (see pkgs/os-specific/linux/kernel/manual-config.nix for arguments).

Oh, also a nice idea. I hadn’t considered I could copy the .config file from this actual system for that.

Still, it’s nice to keep things as automatic as possible! I’ll keep this one in the back pocket for next time.

Thanks a lot,
Matt


> Thanks,
> Shea
> 
> Matthew Robbetts <wingfeathera at gmail.com <mailto:wingfeathera at gmail.com>> writes:
> 
>> Having only just realized that my ath10k driver is built by default without DFS support, I need to modify my kernel options. Googling turned up:
>> https://nixos.org/wiki/How_to_tweak_Linux_kernel_config_options <https://nixos.org/wiki/How_to_tweak_Linux_kernel_config_options> <https://nixos.org/wiki/How_to_tweak_Linux_kernel_config_options <https://nixos.org/wiki/How_to_tweak_Linux_kernel_config_options>>
>> 
>> This lead me to include:
>> 
>> nixpkgs.config.packageOverrides = pkgs: rec {
>> 	...
>> 	stdenv = pkgs.stdenv // {
>> 		platform = pkgs.stdenv.platform // {
>> 			kernelExtraConfig =
>>                        ''
>>                                    CONFIG_EXPERT y
>>                                    CONFIG_CFG80211_CERTIFICATION_ONUS y
>>                                    CONFIG_ATH10K_DFS_CERTIFIED y
>>                        '';
>> 			};
>> 		};
>> 		...
>> 
>> 
>> in my configuration.nix, as these appear to be the three options I need to add. So far so good.
>> 
>> 
>> However, when I try to realize this new configuration, the kernel build fails with:
>> 
>> unused option: CONFIG_ATH10K_DFS_CERTIFIED
>> 
>> If I comment that option, just for kicks, I then fail with:
>> 
>> unused option: CONFIG_CFG80211_CERTIFICATION_ONUS
>> 
>> What am I missing here? Something obvious, I expect! I’ve turned up the following pages with similar seeming failures, but they’re just output dumps with no context:
>> http://pastebin.com/jAMxyzJA
>> http://pastebin.com/4sxGZdaq
>> https://gist.github.com/thorhop/1dc181a40f5320b22ff0
>> 
>> 
>> Thanks,
>> Matt
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl <mailto:nix-dev at lists.science.uu.nl>
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev <http://lists.science.uu.nl/mailman/listinfo/nix-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160723/6877292b/attachment-0001.html>


More information about the nix-dev mailing list