diff --git a/devices/gl-ar750.nix b/devices/gl-ar750.nix index 165c2e9..644d3b7 100644 --- a/devices/gl-ar750.nix +++ b/devices/gl-ar750.nix @@ -25,6 +25,9 @@ "MIPS_ELF_APPENDED_DTB" = "y"; OF = "y"; USE_OF = "y"; + ATH79 = "y"; + SOC_QCA955X = "y"; # actually QCA9531, is this even right? + LIMINIX = "y"; SERIAL_8250_CONSOLE = "y"; SERIAL_8250 = "y"; SERIAL_CORE_CONSOLE = "y"; diff --git a/kernel/default.nix b/kernel/default.nix index c460b1c..2434adc 100644 --- a/kernel/default.nix +++ b/kernel/default.nix @@ -25,7 +25,8 @@ let tree = stdenvNoCC.mkDerivation { name = "spindled-kernel-tree"; src = source; - phases = [ "unpackPhase" "patchScripts" "installPhase" ]; + phases = [ "unpackPhase" "patchPhase" "patchScripts" "installPhase" ]; + patches = [ ./random.patch ]; patchScripts = '' patchShebangs scripts/ ''; diff --git a/kernel/random.patch b/kernel/random.patch new file mode 100644 index 0000000..b8ba423 --- /dev/null +++ b/kernel/random.patch @@ -0,0 +1,9 @@ +diff --git a/Kconfig b/Kconfig +index 745bc773f567..24a6ea92ee19 100644 +--- a/Kconfig ++++ b/Kconfig +@@ -30,3 +30,4 @@ source "lib/Kconfig" + source "lib/Kconfig.debug" + + source "Documentation/Kconfig" ++source "Kconfig.local" diff --git a/kernel/vmlinux.nix b/kernel/vmlinux.nix index d439af6..6851d4d 100644 --- a/kernel/vmlinux.nix +++ b/kernel/vmlinux.nix @@ -16,6 +16,17 @@ let writeConfig = name : config: writeText name config )); kconfigFile = writeConfig "kconfig" (config // checkedConfig); + # KLUDGE FIXME. some symbols we need to enable in some configurations don't + # have a prompt (!), so we can't turn them on just by adding FOO=y and make oldconfig + # + # (!) yes, that was my reaction too + kconfigLocal = writeText "Kconfig.local" '' + config LIMINIX + prompt "Local symbols" + bool + default y + select SOC_QCA955X + ''; checkedConfigFile = writeConfig "checked_kconfig" checkedConfig ; inherit lib; in stdenv.mkDerivation rec { @@ -60,6 +71,7 @@ stdenv.mkDerivation rec { export KBUILD_OUTPUT=`pwd` cp ${kconfigFile} .config cp ${kconfigFile} .config.orig + cp ${kconfigLocal} Kconfig.local ( cd ${tree} && make V=1 olddefconfig ) '';