forked from dan/liminix
1
0
Fork 0

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 {
inherit squashfs;
kernel = nixpkgs.kernel.override {
inherit (config.kernel) config checkedConfig;
inherit (config.kernel) config;
};
dtb = (callPackage ./kernel/dtb.nix {}) {
dts = "${openwrt}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,6 @@
, lib
, config
, checkedConfig ? {}
, src
, 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}"))
config
));
kconfigFile = writeConfig "kconfig" (config // checkedConfig);
checkedConfigFile = writeConfig "checked_kconfig" checkedConfig ;
kconfigFile = writeConfig "kconfig" config;
inherit lib; in
stdenv.mkDerivation rec {
name = "kernel";
@ -75,7 +73,7 @@ stdenv.mkDerivation rec {
checkConfigurationPhase = ''
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"
exit 0
fi

View File

@ -1,5 +1,5 @@
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"

View File

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

View File

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