Skip to content

Commit

Permalink
kernel: Add a validity check for modDirVersion
Browse files Browse the repository at this point in the history
Because if you get it wrong, you get a very confusing error message at
the end of the kernel build, which is quite painful as the build can
take a long time.
  • Loading branch information
dezgeg committed Mar 13, 2017
1 parent 57e768f commit b2c9606
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkgs/os-specific/linux/kernel/manual-config.nix
Expand Up @@ -102,6 +102,13 @@ let
make $makeFlags "''${makeFlagsArray[@]}" oldconfig
runHook postConfigure
make $makeFlags prepare
actualModDirVersion="$(cat $buildRoot/include/config/kernel.release)"
if [ "$actualModDirVersion" != "${modDirVersion}" ]; then
echo "Error: modDirVersion specified in the Nix expression is wrong, it should be: $actualModDirVersion"
exit 1
fi
# Note: we can get rid of this once http://permalink.gmane.org/gmane.linux.kbuild.devel/13800 is merged.
buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=$(date -u -d @$SOURCE_DATE_EPOCH)")
'';
Expand Down

0 comments on commit b2c9606

Please sign in to comment.