remove checkedConfig, check all the config

This commit is contained in:
Daniel Barlow 2022-10-19 22:09:38 +01:00
parent 9c5b5a54e2
commit 76243d306c
11 changed files with 11 additions and 18 deletions

View file

@ -29,7 +29,7 @@ let
outputs = rec { outputs = rec {
inherit squashfs; inherit squashfs;
kernel = nixpkgs.kernel.override { kernel = nixpkgs.kernel.override {
inherit (config.kernel) config checkedConfig; inherit (config.kernel) config;
}; };
dtb = (callPackage ./kernel/dtb.nix {}) { dtb = (callPackage ./kernel/dtb.nix {}) {
dts = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts"; dts = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";

View file

@ -62,7 +62,7 @@
}; };
}; };
kernel = rec { kernel = rec {
checkedConfig = { config = {
MIPS_ELF_APPENDED_DTB = "y"; MIPS_ELF_APPENDED_DTB = "y";
OF = "y"; OF = "y";
USE_OF = "y"; USE_OF = "y";

View file

@ -29,7 +29,7 @@
}; };
kernel = { kernel = {
checkedConfig = { config = {
MIPS_MALTA= "y"; MIPS_MALTA= "y";
CPU_LITTLE_ENDIAN= "n"; CPU_LITTLE_ENDIAN= "n";
CPU_BIG_ENDIAN= "y"; CPU_BIG_ENDIAN= "y";

View file

@ -2,13 +2,12 @@
callPackage callPackage
, config , config
, checkedConfig
, sources , sources
}: }:
{ {
vmlinux = callPackage ./vmlinux.nix { vmlinux = callPackage ./vmlinux.nix {
tree = sources.kernel; tree = sources.kernel;
inherit config checkedConfig; inherit config;
}; };
uimage = callPackage ./uimage.nix { }; uimage = callPackage ./uimage.nix { };

View file

@ -29,10 +29,6 @@ in {
# other strings are also used # other strings are also used
type = types.attrsOf types.nonEmptyStr; type = types.attrsOf types.nonEmptyStr;
}; };
checkedConfig = mkOption {
type = types.attrsOf types.nonEmptyStr;
default = {};
};
}; };
boot.commandLine = mkOption { boot.commandLine = mkOption {
type = types.listOf types.nonEmptyStr; type = types.listOf types.nonEmptyStr;
@ -71,7 +67,6 @@ in {
TMPFS_POSIX_ACL = "y"; TMPFS_POSIX_ACL = "y";
TMPFS_XATTR = "y"; TMPFS_XATTR = "y";
}; };
checkedConfig = config;
}; };
boot.commandLine = [ boot.commandLine = [
"earlyprintk=serial,ttyS0 console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 rootfstype=squashfs" "earlyprintk=serial,ttyS0 console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 rootfstype=squashfs"

View file

@ -5,7 +5,7 @@
{ {
config = { config = {
kernel = { kernel = {
checkedConfig = { config = {
MTD = "y"; MTD = "y";
MTD_PHRAM = "y"; MTD_PHRAM = "y";
MTD_CMDLINE_PARTS = "y"; MTD_CMDLINE_PARTS = "y";

View file

@ -7,7 +7,7 @@ let
in { in {
config = { config = {
kernel = rec { kernel = rec {
checkedConfig = { config = {
CFG80211= "y"; CFG80211= "y";
MAC80211= "y"; MAC80211= "y";
MAC80211_MESH= "y"; MAC80211_MESH= "y";

View file

@ -5,7 +5,6 @@
, lib , lib
, config , config
, checkedConfig ? {}
, src , src
, extraPatchPhase ? "true" , extraPatchPhase ? "true"
} : } :
@ -16,8 +15,7 @@ let writeConfig = name : config: writeText name
(name: value: (if value == "n" then "# CONFIG_${name} is not set" else "CONFIG_${name}=${value}")) (name: value: (if value == "n" then "# CONFIG_${name} is not set" else "CONFIG_${name}=${value}"))
config config
)); ));
kconfigFile = writeConfig "kconfig" (config // checkedConfig); kconfigFile = writeConfig "kconfig" config;
checkedConfigFile = writeConfig "checked_kconfig" checkedConfig ;
inherit lib; in inherit lib; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "kernel"; name = "kernel";
@ -75,7 +73,7 @@ stdenv.mkDerivation rec {
checkConfigurationPhase = '' checkConfigurationPhase = ''
echo Checking required config items: echo Checking required config items:
if comm -2 -3 <(grep 'CONFIG' ${checkedConfigFile} |sort) <(grep 'CONFIG' .config|sort) |grep '.' ; then if comm -2 -3 <(grep 'CONFIG' ${kconfigFile} |sort) <(grep 'CONFIG' .config|sort) |grep '.' ; then
echo -e "^^^ Some configuration lost :-(\nPerhaps you have mutually incompatible settings, or have disabled options on which these depend.\n" echo -e "^^^ Some configuration lost :-(\nPerhaps you have mutually incompatible settings, or have disabled options on which these depend.\n"
exit 0 exit 0
fi fi

View file

@ -1,5 +1,5 @@
set -e set -e
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build '<liminix>' -I liminix-config=../smoke/configuration.nix --arg device "import <liminix/devices/$DEVICE>" -A outputs.kernel.vmlinux -o vmlinux $* NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build '<liminix>' -I liminix-config=../smoke/configuration.nix --arg device "import <liminix/devices/$DEVICE>" -A outputs.kernel -o vmlinux $*
TESTS=$(cat <<"EOF" TESTS=$(cat <<"EOF"

View file

@ -21,6 +21,7 @@ in rec {
"PPP" = "y"; "PPP" = "y";
"PPPOE" = "y"; "PPPOE" = "y";
"PPPOL2TP" = "y"; "PPPOL2TP" = "y";
"L2TP" = "y";
"PPP_ASYNC" = "y"; "PPP_ASYNC" = "y";
"PPP_BSDCOMP" = "y"; "PPP_BSDCOMP" = "y";
"PPP_DEFLATE" = "y"; "PPP_DEFLATE" = "y";

View file

@ -15,7 +15,7 @@ in rec {
imports = [ ../../modules/wlan.nix ]; imports = [ ../../modules/wlan.nix ];
kernel.checkedConfig = { kernel.config = {
MAC80211_HWSIM = "y"; MAC80211_HWSIM = "y";
}; };